CVE-2026-54540

Authenticated terminal command whitelist bypass in Pheditor

Published Jul 27, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Pheditor, a single‑file PHP editor, uses a terminal command feature that validates commands only by checking their prefix against a whitelist of allowed values. The validation check is followed by direct invocation of shell_exec() without escaping or blocking shell substitution syntax such as $(). An authenticated user granted terminal permission can craft a command that passes the whitelist test yet contains $() substitutions, enabling the execution of arbitrary shell code. The result is execution of arbitrary commands under the web server user account, compromising confidentiality, integrity, and availability of the entire system run by the server.

Affected Systems

The vulnerability affects all releases of pheditor earlier than version 2.0.5. In particular, installations of pheditor 2.0.4 and earlier are vulnerable. The product is distributed as a single PHP file and marketed under the pheditor brand.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity, consistent with remote code execution. EPSS < 1%, indicating a very low exploitation probability, but the issue is not listed in the CISA KEV catalog. Because the attack requires authenticated access to the web interface with terminal permission, it is most likely exploitable by attackers who have obtained user credentials or have compromised the site’s authentication system. Once authenticated, the attacker can bypass the command whitelist and fully control the server process.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to pheditor 2.0.5 or later, which contains the patch that removes the unsanitized terminal command execution.
  • Verify that only trusted users have the terminal permission; revoke or limit this capability in the application’s access control settings.
  • Ensure the web server runs with the least privileges necessary; if possible, use a separate low‑privilege user for PHP processes to reduce the impact of any remaining command execution vulnerabilities.

Generated by OpenCVE AI on August 3, 2026 at 17:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9643-6xjp-vx57 Pheditor has an authenticated terminal command whitelist bypass
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pheditor
Pheditor pheditor
Vendors & Products Pheditor
Pheditor pheditor
Type Values Removed Values Added
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.
Title Authenticated terminal command whitelist bypass in Pheditor
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 27, 2026, 6:36 PM
Reserved
Jun 15, 2026, 7:04 PM
Status
Deferred
Published
Jul 27, 2026, 6:16 PM
Modified
Jul 27, 2026, 8:32 PM