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

•By CyberNewsAI Admin•VERIFIED INTEL
Critical WordPress Core RCE CVE-2026-87902 actively 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.
SHARE INTEL:Reddit

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

Attack Chain Flow
// Attack Chain Flow

The exploit sequence leverages an architectural weakness in template hierarchy traversal combined with legacy PHP runtime behaviors:

  1. Unauthenticated Template Parameter Traversal: An attacker issues an unauthenticated HTTP GET request containing double-encoded directory traversal sequences within the pagename query parameter, accompanied by a legitimate page_id value. 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.
  2. 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 as page-templates). The attacker then points the traversal string toward a readable local PHP file on the hosting file system.
  3. 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.php or vendor-specific PEAR paths.
  4. Arbitrary Webshell File Creation: The attacker passes command-line arguments to pearcmd.php via the URL, invoking the config-create subcommand. This instructs PEAR to create a new configuration file at an arbitrary writable file system path—typically /tmp or /var/tmp—with file contents containing base64-encoded or raw PHP code.
  5. 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.php or /tmp/poc87902.php), triggering immediate execution of the embedded PHP code in the security context of the web server (www-data or nobody).

MITRE ATT&CK Tactics, Techniques & Procedures (TTPs)

MITRE ATT&CK • OPERATIONAL TTP MAPPING
TacticTechnique IDTechnique NameOperational Context
ReconnaissanceT1595.002Active Scanning: Vulnerability ScanningAutomated probes querying WordPress core endpoints with traversal payloads
Initial AccessT1190Exploit Public-Facing ApplicationUnauthenticated path traversal in get_page_template() leading to LFI
ExecutionT1059.006Command and Scripting Interpreter: Python / PHPInvocation of pearcmd.php command wrapper to generate arbitrary scripts
PersistenceT1505.003Server Software Component: Web ShellDropping persistent PHP webshells into /tmp/ and /var/tmp/ directories
Defense EvasionT1027.001Obfuscated/Compressed Code: Binary Padding / EncodingsUtilizing double-URL-encoded directory traversal sequences in pagename
DiscoveryT1083File and Directory DiscoveryProbing for the presence of pearcmd.php and theme page- directories
Action on ObjectivesT1059.001Command and Scripting Interpreter: PowerShell / BashSpawning 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.ini configuration to set register_argc_argv = Off. This completely neutralizes the ability of attackers to pass CLI arguments to pearcmd.php via HTTP GET requests.
  • Remove pearcmd.php: In Docker container images, remove unused PEAR utilities by deleting /usr/local/lib/php/pearcmd.php and 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%252f or ..%2f) within URL parameters pagename and page_id.
  • Configure perimeter firewall rules to block inbound traffic from confirmed scanning IP addresses 169.58.48.193 and 169.58.48.195.
  • Restrict web server execution permissions in temporary directories (/tmp, /var/tmp, /dev/shm) by mounting them with the noexec flag where feasible.

3. Endpoint Detection & Hunting Query

QUERY / DETECTION_RULE
SIGMA / YAML
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
QUERY / DETECTION_RULE
SENTINEL / KQL
// 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 desc

Network Indicators

Indicator TypeValueContext / Activity
IPv4 Address169.58.48[.]193Automated reconnaissance and traversal probing host
IPv4 Address169.58.48[.]195Active pearcmd webshell staging and execution host
IPv6 Address2001:df1:e8c0::106bHigh-volume scanning node targeting WordPress sites

Dropped File Artifacts

File Name / Path PatternDescriptionOperational Role
/tmp/wp-pear-rce-flag.phpStaged PHP verification scriptVerification payload indicating exploitable host
/tmp/poc87902.phpStaged proof-of-concept fileAutomated scanner exploit probe artifact
/tmp/luci_<random>.phpMalicious web shellInteractive command execution backdoor
/tmp/zeta_<random>.phpMalicious web shellSecondary persistent backdoor payload
Indicators of Compromise (IOCs)
6 Identified
cveCVE-2026-87902
ip169.58.48.193
ip169.58.48.195
ip2001:df1:e8c0::106b
file-path/tmp/wp-pear-rce-flag.php
file-path/tmp/poc87902.php
SHARE INTEL:Reddit
OPERATIONS_BROADCAST

Watch Full Video Briefings on YouTube

Subscribe to CyberNewsAI on YouTube for animated threat vectors, CISO breakdowns, and security briefings.

SUBSCRIBE_ON_YOUTUBE