Junglewise Threat Intelligence

CVE-2026-48030: Pheditor OS command injection in terminal handler

CVE-2026-48030 · Severity: critical · CVSS 9.9 · Published 2026-07-27

Technologies: Pheditor, pheditor/pheditor (Packagist). Vendors: Pheditor, Packagist.

Executive brief

Pheditor is a web-based tool used for managing and editing files directly on a server. A security flaw allows an authorized user to bypass built-in restrictions and run unauthorized commands on the underlying operating system. This could lead to a complete takeover of the web server, allowing attackers to steal data, delete files, or install malicious software.

Technical details

An OS Command Injection vulnerability exists in the terminal action handler of Pheditor due to improper sanitization of the 'dir' POST parameter. While the 'command' parameter is checked for shell metacharacters, the 'dir' parameter is passed directly into a shell_exec() call (e.g., 'cd ' . $dir . ' && ...'). An attacker with valid credentials and terminal permissions can inject shell metacharacters (like semicolons) into the 'dir' parameter to bypass the TERMINAL_COMMANDS whitelist and achieve Remote Code Execution (RCE). This allows for full system compromise under the context of the web server user (e.g., www-data). The issue is resolved in version 2.0.4 by implementing proper shell argument escaping.

Affected products

  • pheditor Pheditor >= 2.0.1, < 2.0.4

Timeline

  • 2026-05-20: patched: Version 2.0.4 released to fix the vulnerability.
  • 2026-07-27: disclosed: CVE-2026-48030 published.

References

Related threats