CVE-2026-54540 Authenticated terminal command whitelist bypass in Pheditor
Authenticated users can bypass terminal command whitelists via shell substitution to execute arbitrary commands as the web server user.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-54540?
CVE-2026-54540 is a high-severity command injection vulnerability in pheditor, published on 27 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Pheditor is a single-file editor and file manager written in PHP. Prior to version 2.0.5, there is an authenticated terminal command whitelist bypass. The terminal feature checks whether the submitted command starts with one of the configured TERMINAL_COMMANDS values, then passes the full command string to shell_exec(). Shell command substitution such as $() is not blocked, so an authenticated user with the terminal permission can bypass a restricted command allowlist and execute arbitrary shell commands as the web server user. This issue has been patched in version 2.0.5.
Weakness: CWE-78
Which versions are affected by CVE-2026-54540?
2 open source packages ship an affected version, including pheditor/pheditor.
| Package | Affected | Fixed in |
|---|---|---|
pheditor/pheditor Packagist | All versions | 2.0.5 |
pheditor/pheditor Packagist | All versions | 2.0.5 |
How do I fix CVE-2026-54540?
Upgrade pheditor/pheditor to 2.0.5 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-54540 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54540 exists.
Sources
Also known as GHSA-9643-6xjp-vx57.