Skip to content
NewA calmer, faster ZeroHour
VulnerabilityKEVPoC ×238 · 1 read

CVE-2026-87902

Unauthenticated Local File Inclusion to RCE in WordPress Core (fixed in 7.1.2)

CISA: WordPress Core Remote File Inclusion Vulnerability

CVSS 3.1
8.1 high
EPSS
96%p100
Published
·
Added to KEV
Analyze CVE-2026-87902 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

WordPress core's page-template resolution in get_page_template() contains an unauthenticated local file inclusion flaw (CWE-98): a remote attacker with no account can influence which template file WordPress includes, causing it to load a chosen readable local .php file from outside the active theme directories. If certain pre-conditions hold on both the server and the active theme — most notably the existence of an attacker-readable .php file on disk, such as content in an uploads directory — the included file's code executes, escalating the LFI to full remote code execution over the site (CVSS 8.1, high impact to confidentiality, integrity, and availability). The high attack-complexity rating reflects these pre-conditions, but successful exploitation requires no privileges and no user interaction. All sites running WordPress core versions prior to the 7.1.2 security release are affected and should treat this as a priority patch. The issue is fixed in WordPress 7.1.2; there is no public proof of concept, it is not in the CISA KEV catalog, and no exploitation in the wild is currently known.

What to do: Update to WordPress 7.1.2 immediately via Dashboard → Updates (or WP-CLI), and enable automatic updates for security releases so future fixes land without delay. As defense-in-depth against the LFI-to-RCE path, block PHP execution in wp-content/uploads and any other web-writable directories at the web-server level, since RCE depends on including a readable .php file. Afterwards, audit uploads and web logs for unexpected .php files and anomalous template-selection requests.

ProductAffected
WordPress (WordPress.org) WordPress coreAll versions prior to 7.1.2
Estimated exposure
massorder of hundreds of millions of sites (WordPress powers roughly 40%+ of all websites) — This is a WordPress core flaw, so effectively every unpatched self-hosted WordPress installation worldwide is theoretically in scope; WordPress's ~40%+ share of all websites (per public market trackers like W3Techs) puts the base…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

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.

KEVCISA Known Exploited Vulnerability
Affected
WordPress Core
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.
Due date
Ransomware use
Unknown
Vendors
wordpress
Products
wordpress
Weakness
CWE-98
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

In the news

19 stories