How to fix CVE-2026-87902: WordPress Core (exploited in the wild)
CVE-2026-87902 affects WordPress Core; exploited in the wild. What it is, who is affected, and the steps to fix and verify it.
What it is
An unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file outside the active theme directories. If relevant pre-conditions for both the server and the active theme are met, this can lead to RCE.
- Severity: HIGH (CVSS 3.1 8.1, vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). - Weakness: CWE-98.
- NVD published 2026-09-22, status Analyzed.
Who's affected
Anyone running WordPress Core in the version ranges below. Internet-facing instances are the priority.
- wordpress wordpress: up to (not including) 4.7.37.
- wordpress wordpress: from 4.8 up to (not including) 4.8.32.
- wordpress wordpress: from 4.9 up to (not including) 4.9.33.
- wordpress wordpress: from 5.0 up to (not including) 5.0.29.
- wordpress wordpress: from 5.1 up to (not including) 5.1.26.
- wordpress wordpress: from 5.2 up to (not including) 5.2.28.
- wordpress wordpress: from 5.3 up to (not including) 5.3.25.
- wordpress wordpress: from 5.4 up to (not including) 5.4.23.
- wordpress wordpress: from 5.5 up to (not including) 5.5.22.
- wordpress wordpress: from 5.6 up to (not including) 5.6.21.
Version ranges come from the NVD CPE configuration. Confirm against the vendor advisory before you rely on them.
Exploitation status
- Exploited in the wild: added to the CISA Known Exploited Vulnerabilities catalog on 2026-09-25; federal remediation due date 2026-09-28.
- Exploit-DB: EDB-52690 WordPress 7.0.2 - Path Travesal (2026-10-01).
- Public proof-of-concept code: 25 GitHub repositories from 25 accounts, the first on 2026-09-22.
Risk
- EPSS (probability of exploitation activity in the next 30 days): 39.98%, higher than 99% of all scored CVEs (as of 2026-10-24).
- CVERadar threat level: 67/100 (see methodology).
- Likely ATT&CK techniques: T1190 Exploit Public-Facing Application (inferred).
Remediation steps
- Find every instance. List where WordPress Core runs, including test, DR and forgotten internet-facing systems, and record the installed version.
- Upgrade to a fixed release. wordpress wordpress: 4.7.37 or later; wordpress wordpress: 4.8.32 or later; wordpress wordpress: 4.9.33 or later; wordpress wordpress: 5.0.29 or later. Get the build from the vendor advisory.
- If you can't patch today, follow CISA's required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
- Verify the fix. Re-run the version check on every instance and confirm it reports the fixed build (4.7.37 or later). Re-scan from outside if the service is exposed.
- Hunt for signs of earlier compromise. If the system was exposed before you patched, assume it may have been hit and check the items below.
- Rotate credentials stored on or used by the affected system if you cannot rule out compromise, and keep the logs you reviewed.
Detection hints
- T1190 Exploit Public-Facing Application: Review WAF, reverse-proxy and application logs for unusual requests to Core (odd paths, oversized or encoded payloads, bursts of errors), going back to at least 2026-09-22.
Detection commands are generic starting points, not CVE-specific signatures. Use the indicators from the vendor advisory when it publishes them.
Sources
- NVD: CVE-2026-87902 nvd.nist.gov/vuln/detail/CVE-2026-87902
- CVE.org record www.cve.org/CVERecord?id=CVE-2026-87902
- Vendor link from CISA KEV github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-6
- CISA KEV catalog www.cisa.gov/known-exploited-vulnerabilities-catalog
- FIRST EPSS (2026-10-24) api.first.org/data/v1/epss?cve=CVE-2026-87902
Track every exploited CVE
Full record for CVE-2026-87902, with the ATT&CK chain and every source. Browse what attackers are using right now, with fixes you can act on.