
Attackers Exploit WordPress CVE-2026-87902 Within Hours of Patch
CVE-2026-87902 (CVSS 9.2) is an unauthenticated WordPress vulnerability where get_page_template() page-template resolution can be tricked into including an attacker-chosen local .php file outside the active theme directory, leading to RCE when a theme has a page-* top-level directory and a readable local PHP file (e.g. pearcmd.php) exists. Attackers began exploiting it within hours of the September 22, 2026 patch, including pearcmd.php to write PHP web shells to /tmp and /var/tmp and pulling a GitHub-hosted uploader payload, per honeypot telemetry from Previdian and Patchstack with tracked source IPs. CISA added the flaw to its KEV catalog on September 25, 2026, mandating FCEB remediation by September 28; fixed in WordPress 7.1.2, 7.0.6, 6.9.9, and 6.8.10.
What it is
CVE-2026-87902 (CVSS 9.2), the unauthenticated WordPress RCE via get_page_template() template resolution, is under active exploitation. The summary has the mechanism, the patch versions, and the KEV listing — what the page adds is the concrete indicators for hunting: specific source IPs, dropped filenames, the exact pearcmd.php path, and the hosted payload URL.
Preconditions / Affected
Two conditions must both hold (as the summary notes): the active child or parent theme has a top-level directory whose name starts with page- (e.g. page-templates), AND a readable local .php file exists that the web server account can read — attackers target pearcmd.php at /usr/local/lib/php/pearcmd.php.
What to do
Patch to WordPress 7.1.2, 7.0.6, 6.9.9, or 6.8.10, then audit for compromise using these page-supplied IOCs.
Dropped web-shell filenames observed in /tmp and /var/tmp:
wp-pear-rce-flag.phppoc87902.phpluci_<random>.phpzeta_<random>.php
Hosted uploader payload pulled during exploitation:
raw.githubusercontent[.]com/MrG3P5/web-shell/refs/heads/main/uploader.phpSource IPs linked to the attacks:
104.194.9[.]227 (New Jersey, US)
43.250.53[.]42
180.251.159[.]243
195.178.110[.]247
107.189.14[.]87
45.61.184[.]170
92.246.130[.]76Some activity also originated from an Indonesia-based IP. Check for arbitrary PHP writes into /tmp and /var/tmp, and for requests referencing pearcmd.php.
Caveats
Previdian recorded 68 exploitation attempts starting September 23, 2026, with the first effort at 11:49 a.m. UTC on September 22 — the same day patches shipped. Previdian's CEO Ryan Dewhurst assesses that despite likely mass-exploitation, actual compromises will be "relatively few" because WordPress auto-updates are enabled by default and the two theme/server preconditions narrow the exploitable population. Patchstack corroborates the shift from reconnaissance against harmless core files to active pearcmd.php-based file writes.
Organisations named here
- 104.194.9.227
- 107.189.14.87
- 180.251.159.243
- 195.178.110.247
- 43.250.53.42
- 45.61.184.170
- 92.246.130.76
CVEs named here
- CVE-2026-87902
Technologies named here
- WordPress
- pearcmd.php
- uploader.php
- PHP
- GitHub
- CISA KEV
Techniques named here
- Local File Inclusion via page-template resolution
- Arbitrary file write with attacker-controlled PHP content
- Reconnaissance against core files
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
