CVE-2026-54540 in Pheditorinfo

Summary

by MITRE • 07/27/2026

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.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 07/27/2026

The pheditor application presents a critical security vulnerability through its terminal command execution functionality that undermines proper input validation and access controls. This vulnerability affects versions prior to 2.0.5 and represents a significant flaw in the application's privilege management system where authenticated users with terminal permissions can bypass intended security restrictions. The flaw exists within the command validation mechanism that relies on a whitelist approach but fails to properly sanitize or validate the complete command string before execution, creating an exploitable path for malicious command injection.

The technical implementation of this vulnerability stems from the application's inadequate filtering of shell command substitutions and special characters within the terminal feature. When users submit commands through the terminal interface, the system performs a basic prefix check against configured TERMINAL_COMMANDS values but does not adequately validate or sanitize the entire command string before passing it to shell_exec(). This oversight allows attackers to leverage shell substitution mechanisms such as command substitution using $() syntax to bypass the whitelist restrictions and execute arbitrary commands. The vulnerability directly maps to CWE-78 which describes improper neutralization of special elements used in OS commands, a classification that encompasses the failure to properly sanitize command inputs.

The operational impact of this vulnerability is severe as it grants authenticated users with terminal permissions the ability to execute arbitrary shell commands with the privileges of the web server process. This privilege escalation allows attackers to potentially access sensitive system resources, extract confidential data, modify system configurations, or establish persistent access points within the affected environment. The attack surface expands significantly because the vulnerability requires only authentication and the specific terminal permission, which may be granted to users with relatively low privileges within the application's permission model. Attackers can leverage this weakness to perform reconnaissance, escalate privileges, or pivot to other systems within the network infrastructure.

Organizations using pheditor versions prior to 2.0.5 should immediately implement the available patch to address this vulnerability and prevent potential exploitation. The mitigation strategy involves updating to version 2.0.5 or later which contains proper input sanitization and command validation mechanisms that prevent shell command substitution bypasses. Additionally, system administrators should review and restrict terminal permissions to only essential users who require such capabilities for legitimate administrative tasks. Network segmentation and monitoring of unusual command execution patterns can provide additional layers of defense. From an ATT&CK framework perspective, this vulnerability aligns with techniques involving privilege escalation through command injection and execution of malicious code in web server contexts, highlighting the importance of proper input validation and least privilege access controls in preventing such exploitation pathways.

Responsible

GitHub M

Reservation

06/15/2026

Disclosure

07/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Interested in the pricing of exploits?

See the underground prices here!