WordPress Core RCE Flaw CVE-2026-87902 Exploited in the Wild

SOC Briefing Summary :: Executive Key Takeaways
- [01]Threat actors are actively exploiting a critical path traversal vulnerability (CVE-2026-87902, CVSS 9.2) in WordPress Core within hours of patch release.
- [02]The flaw abuses get_page_template() resolution with double-encoded payloads, leveraging pearcmd.php to write arbitrary executable PHP webshells to /tmp.
- [03]Update to WordPress 7.1.2 or backported branches immediately, disable register_argc_argv in php.ini, and block identified scanning IP addresses.
Executive Summary
A critical, unauthenticated remote code execution vulnerability impacting WordPress Core—tracked as CVE-2026-87902 with a CVSS v3.1 score of 9.2 (Critical)—is facing widespread automated exploitation across the global Internet. Discovered by security researcher Robert Ressl, the vulnerability resides in WordPress Core's get_page_template() page-template resolution logic, enabling unauthenticated remote adversaries to induce arbitrary local file inclusion (LFI) outside active theme directories.
Telemetry captured by security monitoring provider Patchstack reveals that initial scanning commenced less than five hours after security fixes were released in WordPress version 7.1.2. Within 24 hours of disclosure, exploit traffic surged tenfold as threat actors transitioned from initial environmental reconnaissance to active payload delivery, writing weaponized PHP web shells to disk.
The vulnerability represents an acute threat to containerized and shared hosting deployments. Environments running official PHP Docker images or default cPanel configurations where PHP's register_argc_argv directive is enabled are directly susceptible to unauthenticated remote code execution via command-line parameter poisoning in bundled PEAR components (pearcmd.php).
Technical Vulnerability Analysis & Attack Chain

The exploit sequence leverages an architectural weakness in template hierarchy traversal combined with legacy PHP runtime behaviors:
- Unauthenticated Template Parameter Traversal: An attacker issues an unauthenticated HTTP GET request containing double-encoded directory traversal sequences within the
pagenamequery parameter, accompanied by a legitimatepage_idvalue. When WordPress processes the request,get_page_template()improperly normalizes the input, allowing the template resolution routine to break out of the active theme folder. - Theme Directory Prerequisite & File Inclusion: For the traversal to execute successfully, the target site's active parent or child theme must contain a top-level directory beginning with the prefix
page-(such aspage-templates). The attacker then points the traversal string toward a readable local PHP file on the hosting file system. - pearcmd.php Parameter Poisoning: When the target web host runs a PHP configuration with
register_argc_argv = On(the default setting in official PHP Docker container images and numerous commercial cPanel installations), URL query parameters are automatically copied into the global$_SERVER['argv']array. The adversary points the template inclusion to/usr/local/lib/php/pearcmd.phpor vendor-specific PEAR paths. - Arbitrary Webshell File Creation: The attacker passes command-line arguments to
pearcmd.phpvia the URL, invoking theconfig-createsubcommand. This instructs PEAR to create a new configuration file at an arbitrary writable file system path—typically/tmpor/var/tmp—with file contents containing base64-encoded or raw PHP code. - Execution of Staged Payload: The threat actor issues a follow-up traversal request to include the newly dropped file (e.g.,
/tmp/wp-pear-rce-flag.phpor/tmp/poc87902.php), triggering immediate execution of the embedded PHP code in the security context of the web server (www-dataornobody).
MITRE ATT&CK Tactics, Techniques & Procedures (TTPs)
| Tactic | Technique ID | Technique Name | Operational Context |
|---|---|---|---|
| Reconnaissance | T1595.002 | Active Scanning: Vulnerability Scanning | Automated probes querying WordPress core endpoints with traversal payloads |
| Initial Access | T1190 | Exploit Public-Facing Application | Unauthenticated path traversal in get_page_template() leading to LFI |
| Execution | T1059.006 | Command and Scripting Interpreter: Python / PHP | Invocation of pearcmd.php command wrapper to generate arbitrary scripts |
| Persistence | T1505.003 | Server Software Component: Web Shell | Dropping persistent PHP webshells into /tmp/ and /var/tmp/ directories |
| Defense Evasion | T1027.001 | Obfuscated/Compressed Code: Binary Padding / Encodings | Utilizing double-URL-encoded directory traversal sequences in pagename |
| Discovery | T1083 | File and Directory Discovery | Probing for the presence of pearcmd.php and theme page- directories |
| Action on Objectives | T1059.001 | Command and Scripting Interpreter: PowerShell / Bash | Spawning interactive reverse shells and harvesting database credentials |
Threat Actor Profile & Campaign Attribution
The observed exploitation activity exhibits traits of opportunistic, distributed threat actors and initial access brokers (IABs). Within hours of WordPress deploying security advisories, automated scanning clusters originated from distinct autonomous systems.
Rather than executing single targeted intrusions, the operators are utilizing mass scanning botnets to identify susceptible WordPress instances globally. Once confirmed, secondary stages deliver webshells to secure persistent initial access for potential resale or follow-on ransomware staging.
Observed source IP addresses driving the automated probe waves include 169.58.48.193, 169.58.48.195, and IPv6 address 2001:df1:e8c0::106b.
Detection & SOC Mitigation Playbook
1. Patch & Workaround Guidance
- Upgrade WordPress Core: Immediately update all WordPress installations to version 7.1.2. Fixes have been backported to all historical branches from 7.1 down to version 4.7 (branches 4.6 and older will not receive security patches and must be upgraded).
- Disable register_argc_argv: Modify your server's
php.iniconfiguration to setregister_argc_argv = Off. This completely neutralizes the ability of attackers to pass CLI arguments topearcmd.phpvia HTTP GET requests. - Remove pearcmd.php: In Docker container images, remove unused PEAR utilities by deleting
/usr/local/lib/php/pearcmd.phpand associated command-line wrappers if PEAR functionality is not strictly required.
2. Network & Perimeter Defenses
- Deploy Web Application Firewall (WAF) inspection rules that block inbound HTTP requests containing double-encoded path traversal sequences (e.g.,
%252e%252e%252for..%2f) within URL parameterspagenameandpage_id. - Configure perimeter firewall rules to block inbound traffic from confirmed scanning IP addresses
169.58.48.193and169.58.48.195. - Restrict web server execution permissions in temporary directories (
/tmp,/var/tmp,/dev/shm) by mounting them with thenoexecflag where feasible.
3. Endpoint Detection & Hunting Query
title: Suspicious WordPress Pearcmd Web Shell Generation in Temporary Directories
id: 3b9c1d45-7e82-4f10-9012-123456789abc
status: experimental
description: Detects web server processes invoking pearcmd.php with config-create parameters or creating executable PHP scripts in /tmp directories.
author: CyberNewsAI Threat Intelligence
references:
- https://www.bleepingcomputer.com/news/security/hackers-start-exploiting-critical-wordpress-flaw-for-code-execution/
tags:
- attack.t1190
- attack.t1059
- attack.t1505.003
logsource:
category: process_creation
product: linux
detection:
selection_pear:
Image|endswith:
- '/php'
- '/php-fpm'
CommandLine|contains:
- 'pearcmd.php'
- 'config-create'
- '/tmp/'
selection_files:
Image|endswith:
- '/php-fpm'
- '/httpd'
- '/nginx'
CommandLine|contains:
- 'poc87902.php'
- 'wp-pear-rce-flag.php'
- 'luci_'
- 'zeta_'
condition: selection_pear or selection_files
falsepositives:
- Legitimate automated administrative command-line PEAR configuration tasks
level: critical// Microsoft Sentinel / Defender Hunting Query: Detect Web Server File Creation in Temporary Paths and Pearcmd Execution
DeviceFileEvents
| where Timestamp > ago(7d)
| where FolderPath has_any ("/tmp", "/var/tmp", "/dev/shm")
| where FileName endswith ".php"
| where InitiatingProcessFileName in~ ("php-fpm", "httpd", "nginx", "apache2", "php")
| project Timestamp, DeviceName, ActionType, FolderPath, FileName, InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp descNetwork Indicators
| Indicator Type | Value | Context / Activity |
|---|---|---|
| IPv4 Address | 169.58.48[.]193 | Automated reconnaissance and traversal probing host |
| IPv4 Address | 169.58.48[.]195 | Active pearcmd webshell staging and execution host |
| IPv6 Address | 2001:df1:e8c0::106b | High-volume scanning node targeting WordPress sites |
Dropped File Artifacts
| File Name / Path Pattern | Description | Operational Role |
|---|---|---|
| /tmp/wp-pear-rce-flag.php | Staged PHP verification script | Verification payload indicating exploitable host |
| /tmp/poc87902.php | Staged proof-of-concept file | Automated scanner exploit probe artifact |
| /tmp/luci_<random>.php | Malicious web shell | Interactive command execution backdoor |
| /tmp/zeta_<random>.php | Malicious web shell | Secondary persistent backdoor payload |
CVE-2026-87902169.58.48.193169.58.48.1952001:df1:e8c0::106b/tmp/wp-pear-rce-flag.php/tmp/poc87902.php// VERIFIED_SOURCES_&_REFERENCES
Watch Full Video Briefings on YouTube
Subscribe to CyberNewsAI on YouTube for animated threat vectors, CISO breakdowns, and security briefings.
Related Threat Intelligence
View Archive
TeamFiltration Attacks Breach Microsoft 365 Cloud Accounts
The UNK_CondorFiltration campaign weaponized TeamFiltration against 28 Microsoft 365 tenants, compromising dormant service accounts with default passwords.

Ransomware Gangs Exploit Critical TeamCity Auth Bypass Flaw
CISA warns ransomware gangs are actively weaponizing a critical JetBrains TeamCity auth bypass flaw (CVE-2026-63077) to execute OS commands and hijack CI/CD.

Roundcube Webmail Pre-Auth SQLi CVE-2026-48842 Under Attack
A critical pre-auth SQL injection in Roundcube's virtuser_query plugin (CVE-2026-48842) is under active attack across 523,000 Internet-exposed webmail hosts.