Pheditor: Terminal command-allowlist bypass via argument injection leads to RCE — surviving vector after the metacharacter-sanitization fixes
High severity. Published 24 July 2026. Update pheditor/pheditor to 2.0.7 or later: composer update pheditor/pheditor.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| pheditor/pheditor (opens in a new tab) | <= 2.0.6 | 2.0.7 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show pheditor/pheditor
composer auditAdvisory details
| Severity | HighCVSS 8.8 |
|---|---|
| Published | |
| Updated | |
| GHSA | GHSA-g3hq-hphg-8fhh (opens in a new tab) |
| Weakness | CWE-78, CWE-88 |
What the advisory says
Summary
pheditor's terminal feature restricts callers to an allowlist of commands (TERMINALCOMMANDS) and rejects shell metacharacters. The allowlist is enforced as a PREFIX match with no argument validation, and the allowlist includes binaries that grant arbitrary command execution through their own options (find, git, php, tar, grep). A caller can therefore run any command using only allowlisted binaries and no rejected metacharacter, escaping the allowlist restriction the terminal feature relies on.
Relationship to the prior terminal advisories (this is a surviving, distinct vector)
Source: GHSA-g3hq-hphg-8fhh (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- Pheditor: Authentication Bypass in Forced Password-Change Flow via Unverified Current Password (critical, 24 July 2026)
- Pheditor: Incomplete command sanitization in terminal feature allows RCE via pipe operator, backtick substitution, and newline injection (high, 16 July 2026)
- Pheditor: Hardcoded default password 'admin' with no forced change enables full application compromise (critical, 16 July 2026)
- Pheditor has an authenticated terminal command whitelist bypass (high, 16 July 2026)