What is wrong
An unauthenticated attacker can cause `get_page_template()` resolution to include a readable local `.php` file outside active theme directories. If specific preconditions for both the server and the active theme are met, this vulnerability can lead to remote code execution.
Who is affected
This vulnerability affects WordPress versions prior to 7.1.2.
What to do
Upgrade WordPress to version 7.1.2.
Original description
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.
Known exploited (CISA KEV)
- Added to KEV
- 2026-09-25
- Remediation due (US federal)
- 2026-09-28
- Ransomware use
- Unknown
- 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.
Affected software
- WordPress ≥ 6.0 < 6.0.16≥ 6.1 < 6.1.14≥ 5.3 < 5.3.25≥ 7.0 < 7.0.6≥ 5.6 < 5.6.21< 7.1.2 Fixed in: 6.0.16, 6.1.14, 5.3.25, 7.0.6 exact match
Details
- Published
- 2026-09-22
- Last modified
- 2026-09-28
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H- CWE
- CWE-98
- EPSS (30-day exploit probability)
- 95.77% (percentile 100)
References
- cve.org/CVE-2026-87902
- nvd.nist.gov/vuln/detail/CVE-2026-87902
- github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp
- patchstack.com/articles/cve-2026-87902-attackers-started-probing-wordpress-sites-hours-aft...
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-87902
Track these versions on your own servers
InfraGuard collects installed software versions from every server and flags the ones with known vulnerabilities. Self-hosted — nothing leaves your network.
This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE® is a registered trademark of The MITRE Corporation; CVE records are used under the CVE Program Terms of Use.