# Pheditor RCE via terminal command allowlist bypass

Source: https://junglewise.ai/threats/pheditor-rce-via-terminal-command-allowlist-bypass-3f72f746  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-24. Updated: 2026-07-25  
License: CC BY 4.0 with a link back

Severity: high · CVSS 8.8 · Published 2026-07-24

Pheditor, a web-based code editor, contains a vulnerability in its terminal feature that allows users to bypass security restrictions. While the tool attempts to limit users to a specific list of safe commands, it fails to properly check the arguments provided to those commands. An attacker with basic access can use this flaw to execute arbitrary code on the server, potentially leading to a full system takeover and theft of sensitive data.

Technologies: [pheditor/pheditor (Packagist)](https://junglewise.ai/threats/technologies/pheditor-pheditor), [Pheditor](https://junglewise.ai/threats/technologies/pheditor). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Pheditor](https://junglewise.ai/threats/vendors/pheditor).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 8.8, published 24 July 2026.

**Which products and versions are affected?** pheditor/pheditor (Packagist) <= 2.0.6; Pheditor <= 2.0.6.

**Is there a fix for This vulnerability?** A patch was published on 2026-07-24: Version 2.0.7 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a web application.

**Am I affected?** Check whether you run pheditor/pheditor (Packagist) or Pheditor at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

Pheditor's terminal feature implements a command allowlist (TERMINAL_COMMANDS) using a prefix-based string match and a denylist for shell metacharacters. However, it fails to validate the arguments following the allowlisted command. Because the allowlist includes powerful binaries like 'find', 'git', 'php', and 'tar', an attacker can use legitimate flags (such as 'find -exec' or 'php -r') to execute arbitrary OS commands. The vulnerability exists in pheditor.php because it uses shell_exec() on the unvalidated command string. This bypass persists even after previous fixes for metacharacter injection. A patch is available in version 2.0.7.

## Affected products

- pheditor Pheditor <= 2.0.6

## Timeline

- 2026-07-23: disclosed
- 2026-07-24: advisory: GHSA-g3hq-hphg-8fhh published
- 2026-07-24: patched: Version 2.0.7 released

## References

- [https://api.github.com/users/anir0y](https://api.github.com/users/anir0y)
- [https://github.com/anir0y](https://github.com/anir0y)
- [https://api.github.com/users/anir0y/gists%7B/gist_id%7D](https://api.github.com/users/anir0y/gists%7B/gist_id%7D)
- [https://api.github.com/users/anir0y/repos](https://api.github.com/users/anir0y/repos)
- [https://avatars.githubusercontent.com/u/29829469?v=4](https://avatars.githubusercontent.com/u/29829469?v=4)
- [https://api.github.com/users/anir0y/events%7B/privacy%7D](https://api.github.com/users/anir0y/events%7B/privacy%7D)

## Related threats

- [Pheditor hardcoded default password in pheditor.php](https://junglewise.ai/threats/cve-2026-55579-pheditor-hardcoded-default-password-in-pheditor-php)
- [Pheditor OS command injection in terminal feature](https://junglewise.ai/threats/cve-2026-55578-pheditor-os-command-injection-in-terminal-feature)
- [Pheditor OS command injection via terminal whitelist bypass](https://junglewise.ai/threats/cve-2026-54540-pheditor-os-command-injection-via-terminal-whitelist-bypass)
- [Pheditor OS command injection in terminal handler](https://junglewise.ai/threats/cve-2026-48030-pheditor-os-command-injection-in-terminal-handler)
- [Pheditor authentication bypass in forced password-change flow](https://junglewise.ai/threats/pheditor-authentication-bypass-in-forced-password-change-flow-b0aed4a4)
