TL;DR: Apply the vendor-supplied WordPress Core patch immediately in accordance with vendor instructions and CISA BOD 26-04 guidance. If a patch is unavailable or cannot be applied, consider taking the affected installation offline until remediation is complete.
What Is the Flaw?
CVE-2026-87902 is a Remote File Inclusion (RFI) vulnerability (NVD entry) classified under CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program. It carries a CVSS 3.1 score of 8.1 (HIGH) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
The root cause lies in how WordPress Core's get_page_template() function resolves page templates. Under specific server-side and active-theme pre-conditions, an unauthenticated attacker can influence this resolution process so that a readable local .php file outside the active theme directories is included by the PHP runtime. This is a server-local file inclusion triggered remotely — hence the RFI classification — rather than a classic remote URL inclusion.
The Attack Complexity is rated High (AC:H), reflecting that exploitation requires certain pre-conditions on both the server environment and the active theme to be satisfied simultaneously. However, the absence of any authentication requirement (PR:N, UI:N) means that if those pre-conditions exist, any internet-facing attacker can attempt exploitation without credentials.
Who and What Is Affected?
The vulnerability affects WordPress Core. Any WordPress installation that:
- Is reachable over a network (internet-facing or otherwise),
- Meets the unspecified server-side pre-conditions (such as particular PHP configurations or server setups), and
- Uses an active theme that satisfies the theme-level pre-conditions described in the vendor advisory
…is potentially vulnerable to exploitation leading to RCE.
Because WordPress is among the most widely deployed content management systems globally, the population of potentially affected installations is very large. CISA added this CVE to the Known Exploited Vulnerabilities (KEV) catalog on 2026-09-25, indicating that exploitation has been observed in practice. Federal civilian executive branch (FCEB) agencies in the United States are bound by BOD 26-04 to prioritise remediation.
Organisations running WordPress Core on internet-facing infrastructure should treat this as urgent regardless of regulatory obligations.
Potential Impact
The CVSS confidentiality, integrity, and availability impact scores are all rated High. If exploited successfully, an attacker could achieve:
- Remote Code Execution (RCE): By causing the server to include and execute a chosen PHP file, an attacker may run arbitrary code in the context of the web server process.
- Full confidentiality breach: Arbitrary code execution can expose sensitive data stored on the server, including WordPress database credentials, configuration files, and user data.
- Integrity compromise: An attacker with code execution can modify files, install backdoors, or alter database content.
- Availability impact: Malicious code execution can disrupt or take down the affected service entirely.
It is important to note that the CVSS Attack Complexity of High means successful exploitation is not trivial — specific environmental pre-conditions must be present. However, CISA's KEV listing confirms that real-world attackers have demonstrated the ability to meet those pre-conditions in practice.
What to Do Now
CISA's required action for CVE-2026-87902 is to apply mitigations in accordance with vendor instructions, ensuring compliance with CISA BOD 26-04 and CISA's Forensics Triage Requirements. Organisations should take the following steps:
- Patch immediately. Consult the official WordPress security advisory and apply the available Core update as soon as possible. WordPress.org publishes security releases through its standard update mechanism; ensure automatic background updates are enabled for security releases where policy permits.
- Review your exposure. Assess whether your WordPress installation is internet-facing and whether its server configuration and active theme meet the conditions that increase exploitation risk. Prioritise internet-exposed instances first.
- Apply BOD 26-04 timelines. Federal agencies must follow the patching deadlines prescribed in BOD 26-04. Non-federal organisations should use equivalent internal SLAs appropriate to a HIGH-severity, actively exploited vulnerability.
- Consider forensic triage. Per CISA's guidance, organisations should review logs and artefacts on affected systems to determine whether exploitation has already occurred before or during remediation.
- Discontinue use if unmitigatable. CISA explicitly states that if mitigations are unavailable, organisations should consider discontinuing use of the product.
- Harden server configuration. While waiting for or alongside patching, review PHP and web server configurations to limit unnecessary file inclusion attack surface (e.g.,
open_basedirrestrictions, least-privilege file permissions). - Monitor for indicators of compromise. Review web server and application logs for anomalous template resolution behaviour or unexpected PHP file access patterns.
Primary references: NVD — CVE-2026-87902 | CISA KEV Catalog | WordPress.org security advisories.
How Continuous External Testing Surfaces This Exposure
One of the key challenges with a vulnerability like CVE-2026-87902 is that its exploitability depends on a combination of factors: network reachability, server configuration, and theme-level pre-conditions. Internal asset inventories and periodic point-in-time scans frequently miss the nuance of which conditions are actually present on externally reachable hosts.
Continuous external attack surface testing addresses this gap in several ways:
- Always-on visibility: An external testing platform continuously monitors your internet-facing assets and can flag newly exposed or unpatched WordPress Core installations as soon as the vulnerability becomes known — not weeks later during the next scheduled scan window.
- Detection of environmental pre-conditions: By probing from an unauthenticated, external vantage point — exactly as an attacker would — continuous testing can identify whether a WordPress endpoint exhibits the characteristics associated with elevated exploitation risk (e.g., template resolution behaviours observable from outside, server banners, or configuration indicators).
- Patch verification: After applying the WordPress Core update, continuous external testing confirms from the outside that the patch is effective and that no residual exposure remains due to misconfiguration or failed update application.
- Prioritisation under BOD 26-04: For organisations with large WordPress fleets, continuous testing helps triage which assets are internet-exposed and therefore subject to the most urgent BOD 26-04 remediation timelines.
A purely internal or infrequent scanning approach would leave a gap between vulnerability publication and detection — a gap that KEV-listed vulnerabilities demonstrate attackers actively exploit.
Sources & further reading: NVD CVE-2026-87902 and the CISA KEV catalog are the authority on affected and fixed versions. Vendor/independent analysis: github.com, patchstack.com, cisa.gov. This advisory contains no exploit code.
Frequently asked questions
Does an attacker need any credentials to exploit CVE-2026-87902?
No. The CVSS vector for CVE-2026-87902 specifies Privileges Required: None (PR:N) and User Interaction: None (UI:N), meaning exploitation does not require authentication or any action from a legitimate user. However, Attack Complexity is rated High (AC:H), meaning certain server and theme pre-conditions must be present for exploitation to succeed.
Is this vulnerability being actively exploited?
Yes. CISA added CVE-2026-87902 to its Known Exploited Vulnerabilities (KEV) catalog on 2026-09-25, which indicates that exploitation has been observed in practice. Organisations should treat remediation as urgent.
What is the difference between this RFI flaw and a classic Remote File Inclusion?
Classic RFI vulnerabilities allow an attacker to cause a server to fetch and include a file from a remote URL. CVE-2026-87902 is classified under CWE-98 (Improper Control of Filename for Include/Require Statement in PHP Program) and involves an attacker influencing WordPress Core's get_page_template() function to include a readable local .php file already present on the server but outside the expected theme directories. The term 'remote' here refers to the attack being initiated remotely by an unauthenticated network-based attacker.
What should I do if I cannot patch immediately?
CISA's required action states that if mitigations are unavailable, organisations should consider discontinuing use of the product for internet-facing scenarios. In the interim, hardening measures such as PHP open_basedir restrictions and least-privilege file permissions may reduce the available attack surface, but these are not substitutes for the official vendor patch. Consult the WordPress.org security advisory for any specific workarounds the vendor has provided.