[ CVE-2026-87902 · Published 22 Sep 2026 ]
Local file inclusion in WordPress core can lead to code execution
[ Why it matters ]Priority signals
- Exploited in the wild: on CISA's Known Exploited Vulnerabilities list since 2026-09-25
- EPSS: 40% chance of exploitation in the next 30 days (higher than 99% of CVEs)
[ Analyst view ]Is this a red alert for you?
Red alert
CISA lists it as exploited and it needs no credentials, although specific server and theme conditions must be met.
- Red alert if
- You run WordPress older than 7.1.2 with automatic updates switched off.
- Can wait if
- Your sites have already updated to 7.1.2, or you do not use WordPress.
- What it is
- WordPress page-template resolution can be made to include a chosen local .php file outside the active theme directories, without logging in. If certain conditions in the server and active theme are met, this leads to remote code execution. WordPress before 7.1.2 is affected.
- Impact
- An attacker without an account could run code on the web server, but only on sites whose server and theme meet specific conditions. A compromised WordPress site can be defaced, used to spread malware to visitors or used to steal customer data and admin credentials.
How an attack would work MITRE ATT&CK
- T1190 Exploit Public-Facing ApplicationThe attacker sends crafted requests to the public WordPress site.
- T1059 Command and Scripting InterpreterAn included PHP file runs code as the web server user.
- T1505.003 Server Software Component: Web ShellA web shell or malicious plugin keeps access.
- T1491 DefacementThe site's content is changed or used to serve malicious code.
What to do
- Check that every WordPress site runs 7.1.2 or later; automatic background updates usually install this, but confirm it in the dashboard.
- Update the active theme and plugins as well.
- Look for unknown PHP files, new administrator accounts and plugins you did not install.
- If you find signs of compromise, restore from a clean backup and change all admin and database passwords.
[ Description ]Official 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.
CISA: WordPress Core contains a remote file inclusion vulnerability which could allow an unauthenticated attacker to make page-template resolution include a chosen readable local `.php` file outside the active theme directories, leading to remote code execution.
[ Fixes ]Fixes and patches
CISA required action (US federal deadline 28 Sep 2026): 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.
- Security bulletin: WordPress GHSA-7hp8-65ch-5whpVendor patch or bulletin · CERT-FR · github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-6, cited by CERT-FR CERTFR-2026-AVI-1216
- Security bulletin: WordPress wordpress-7-1-2Vendor patch or bulletin · CERT-FR · wordpress.org/news/2026/09/wordpress-7-1-2-release, cited by CERT-FR CERTFR-2026-AVI-1216
[ Advisories ]Government CERT advisories
-
BSI CERT-BundWID-SEC-2026-3539
WordPress: Vulnerability allows code execution Translated from German
-
NCSC-NLNCSC-2026-0389
Vulnerability fixed in WordPress Translated from Dutch
-
CERT-FRCERTFR-2026-AVI-1216
Vulnerability in WordPress Translated from French
A vulnerability has been discovered in WordPress. It allows an attacker to cause remote arbitrary code execution.
[ References ]References
- github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whpVendor Advisory
- patchstack.com/articles/cve-2026-87902-attackers-started-probing-wordpress-sites-hours-…Third Party Advisory
- www.cisa.gov/known-exploited-vulnerabilities-catalogUS Government Resource