Pheditor OS Command Injection via Unsanitized 'dir' Parameter (CVE-2026-48030)
Detects exploitation of CVE-2026-48030, a critical OS command injection vulnerability in Pheditor versions 2.0.1 through 2.0.3. The terminal handler accepts an unsanitized 'dir' parameter that is passed directly to a shell command, allowing unauthenticated or authenticated attackers to execute arbitrary OS commands on the hosting server. A public proof-of-concept exists, making active exploitation likely.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- composer
- Product
- pheditor/pheditor
- Versions
- >= 2.0.1, <= 2.0.3
Weakness (CWE)
Timeline
- Disclosed
- June 9, 2026
What is CVE-2026-48030 Pheditor OS Command Injection via Unsanitized 'dir' Parameter (CVE-2026-48030)?
Pheditor OS Command Injection via Unsanitized 'dir' Parameter (CVE-2026-48030) (CVE-2026-48030) maps to the Execution and Persistence and Privilege Escalation and Lateral Movement tactics — the adversary is trying to run malicious code in MITRE ATT&CK.
This page provides production-ready detection logic for Pheditor OS Command Injection via Unsanitized 'dir' Parameter (CVE-2026-48030), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Microsoft Sentinel, DeviceProcessEvents, DeviceNetworkEvents. The queries below are rated critical severity at high confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
union DeviceProcessEvents, DeviceNetworkEvents
| where TimeGenerated >= ago(24h)
| where InitiatingProcessFileName in~ ("php", "php-fpm", "php-cgi", "httpd", "apache2", "nginx")
| where (ProcessCommandLine contains "pheditor" or InitiatingProcessCommandLine contains "pheditor")
or (ProcessCommandLine matches regex @"(?i)(dir=|%26|%7C|%3B)[\s]*([a-z]+\s+\/|whoami|id|cat\s+\/etc|curl|wget|bash|sh\s+-c|powershell)")
| extend SuspiciousTokens = extract_all(@"(?i)(whoami|id\b|uname|cat\s+/etc/passwd|curl\s+http|wget\s+http|bash\s+-[ic]|sh\s+-c|python[23]?\s+-c|perl\s+-e|nc\s+-|ncat\s+|chmod\s+[0-9]+|/tmp/[a-zA-Z0-9]+)", ProcessCommandLine)
| where array_length(SuspiciousTokens) > 0 or array_length(extract_all(@"(?i)(whoami|id\b|uname|cat\s+/etc/passwd|curl\s+http|wget\s+http|bash\s+-[ic]|sh\s+-c|python[23]?\s+-c|perl\s+-e|nc\s+-|ncat\s+|chmod\s+[0-9]+|/tmp/[a-zA-Z0-9]+)", InitiatingProcessCommandLine)) > 0
| project TimeGenerated, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessCommandLine, InitiatingProcessFileName, RemoteIP, RemotePort, ActionType
| extend AlertDetail = "Potential CVE-2026-48030 exploitation: OS command injection via Pheditor terminal handler dir parameter" Detects process execution chains originating from PHP/web server processes that match patterns consistent with OS command injection exploitation of the Pheditor terminal handler. Looks for suspicious child processes spawned by PHP with command-line tokens associated with post-exploitation activity.
Data Sources
Required Tables
False Positives
- Legitimate Pheditor usage by developers running terminal commands against known-safe directories
- Automated CI/CD pipelines that invoke PHP CLI tools with directory parameters
- Security scanners or vulnerability assessment tools probing the endpoint
- Developers testing file manager functionality in staging environments
Sigma rule & cross-platform mapping
The detection logic for Pheditor OS Command Injection via Unsanitized 'dir' Parameter (CVE-2026-48030) (CVE-2026-48030) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-48030
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Basic whoami Injection via dir Parameter
Expected signal: Web server access log entry showing request URI containing '%3B' and 'whoami'. Auditd EXECVE record for /usr/bin/whoami with parent process php-fpm or apache2 and uid matching the web server service account.
- Test 2Out-of-Band Data Exfiltration via DNS Lookup
Expected signal: DNS query from web server IP to attacker-controlled domain visible in DNS server logs and network flow data. Auditd record for nslookup or dig process spawned under web server account. NetworkConnect events from DeviceNetworkEvents to the external DNS resolver.
- Test 3Web Shell Implantation via Piped Command Chain
Expected signal: Auditd OPENAT/CREATE syscall for /var/www/html/shell.php attributed to web server service account. File creation event in EDR telemetry (DeviceFileEvents or equivalent) with InitiatingProcessFileName=php/apache2 and FileName=shell.php. Web server access log entry with %7C in the dir parameter.
- Test 4Reverse Shell via Bash TCP Redirect
Expected signal: Auditd EXECVE for bash with arguments '-i' and '/dev/tcp/ATTACKER_LAB_IP/4444' under web server parent process. Outbound TCP connection from web server to attacker lab IP on port 4444 in network flow logs. DeviceNetworkEvents entry from the EDR showing the connection establishment.
Unlock Pro Content
Get the full detection package for CVE-2026-48030 including response playbook, investigation guide, and atomic red team tests.