# Pheditor has an authenticated terminal command whitelist bypass

High severity, published 2026-07-16. Update pheditor/pheditor to 2.0.5 or later: composer update pheditor/pheditor.

Canonical URL: https://buzzphp.com/security/ghsa-9643-6xjp-vx57 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 8.8) |
| Published | 2026-07-16 |
| Updated | 2026-07-16 |
| CVE | [CVE-2026-54540](https://nvd.nist.gov/vuln/detail/CVE-2026-54540) |
| GHSA | [GHSA-9643-6xjp-vx57](https://github.com/advisories/GHSA-9643-6xjp-vx57) |
| Weakness | CWE-78 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| pheditor/pheditor | <= 2.0.4 | 2.0.5 |

## What to do

Update pheditor/pheditor to 2.0.5 or later: composer update pheditor/pheditor.

Check which version you run with `composer show pheditor/pheditor`, and every affected package with `composer audit`.

## About this advisory

Summary

Pheditor 2.0.4 has an authenticated terminal command whitelist bypass.

The terminal feature checks whether the submitted command starts with one of the configured TERMINALCOMMANDS values, then passes the full command string to shellexec(). 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.

Details

Tested repository:

https://github.com/pheditor/pheditor

Tested commit:

62b43df7cb8956a9b0deb9bec278ca8676c890c5

Affected version:

Pheditor 2.0.4

Relevant code in pheditor.php:



## Links

- [GHSA-9643-6xjp-vx57 on GitHub](https://github.com/advisories/GHSA-9643-6xjp-vx57)
- [CVE-2026-54540 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-54540)
- [All Composer security advisories](https://buzzphp.com/security)
