Skip to main content

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

The flaw abuses get_page_template() resolution with double-encoded payloads, leveraging pearcmd.php to write arbitrary executable PHP webshells to /tmp.

// 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
Need to defang indicators or test triage logs?
Use our zero-telemetry client-side parser to extract, defang & format indicators.
Open SOC Defanger Workbench
Target Log Sources & Tables
DeviceFileEvents

Ensure telemetry connector is actively ingesting this table into your Sentinel workspace or Defender XDR.

False Positives & Tuning Guidance

Legitimate administrative software deployment scripts, authorized security testing, or system maintenance tasks.

Source Incident Analysis

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

Disclosed: 2026-09-24

Read Attack Chain
DETECTION_ENGINEERING_FEEDBACK

Have tuning recommendations, encounter false positives in your environment, or want to contribute rule improvements?

Submit Feedback →