CVE-2026-87902

HIGH(8.1)KEVLikely Exploited

WordPress Core Remote File Inclusion Vulnerability

Description

CVE-2026-87902 is a high-severity PHP file inclusion vulnerability in WordPress Core. An unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file from outside the active theme directories, and where the relevant preconditions for both the server and the active theme are met, that inclusion leads to remote code execution. The affected range spans essentially the whole supported history of WordPress, from versions below 4.7.37 through to 7.1.2, with a fixed release in every maintained branch. Given how much of the web runs on WordPress and how quickly attackers moved — Patchstack reported probing within hours of the patch — this file inclusion vulnerability is being scanned for at scale. CISA has added CVE-2026-87902 to the Known Exploited Vulnerabilities catalog, its EPSS score of 40.0% places it in the 99th percentile, and the remediation deadline of September 28, 2026 has already passed.

KEV Information

Vendor
WordPress
Product
Core
Date Added
September 25, 2026
Due Date
September 28, 2026
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.

CVSS Score

Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in Calculator
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
Exploitability Score
2.2
Impact Score
5.9

CWEs

Affected Products

VendorProductVersion
wordpresswordpress< 4.7.37; >= 4.8, < 4.8.32; >= 4.9, < 4.9.33; >= 5.0, < 5.0.29; >= 5.1, < 5.1.26; >= 5.2, < 5.2.28; >= 5.3, < 5.3.25; >= 5.4, < 5.4.23; >= 5.5, < 5.5.22; >= 5.6, < 5.6.21; >= 5.7, < 5.7.19; >= 5.8, < 5.8.17; >= 5.9, < 5.9.18; >= 6.0, < 6.0.16; >= 6.1, < 6.1.14; >= 6.2, < 6.2.13; >= 6.3, < 6.3.12; >= 6.4, < 6.4.12; >= 6.5, < 6.5.12; >= 6.6, < 6.6.9; >= 6.7, < 6.7.9; >= 6.8, < 6.8.10; >= 6.9, < 6.9.9; >= 7.0, < 7.0.6; >= 7.1, < 7.1.2

References

Weakness Type

CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program

This weakness occurs when a PHP application builds an include or require path from externally influenced input without validating it, so an attacker chooses which file the interpreter executes. In WordPress, the template resolution performed by get_page_template() can be steered to a .php file outside the active theme directories; because PHP executes whatever it includes, a file the attacker can point at becomes code running inside WordPress.

Learn more: CWE-98 — Improper Control of Filename for Include/Require Statement in PHP Program

Impact Analysis

CVE-2026-87902 has a CVSS 3.1 base 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. Attack Vector (Network), Privileges Required (None), User Interaction (None): the request comes from the internet with no account and no victim, which is the worst possible starting position for a defender and the reason mass scanning began immediately. Attack Complexity (High) reflects the vendor's own caveat — reaching code execution depends on preconditions on both the server and the active theme, so not every site is exploitable to the full extent, but the inclusion itself is the generic part and the conditions are common enough that the EPSS model puts this in the 99th percentile. Confidentiality, Integrity and Availability (all High): code executing inside WordPress reads wp-config.php and therefore the database credentials, can modify posts, users and plugins, can plant a persistent web shell, and can take the site down. For agencies and hosts running many sites on shared infrastructure, one exploited instance frequently becomes many. Treat an unpatched, internet-facing WordPress as already probed.

Exploit Maturity

CISA has added CVE-2026-87902 to the Known Exploited Vulnerabilities catalog, confirming exploitation in the wild, and the remediation deadline of September 28, 2026 has already passed; the entry does not flag use in ransomware campaigns. Patchstack reported that attackers started probing WordPress sites hours after the patch, which is the characteristic pattern for WordPress Core issues: the fix is public in the source tree, the diff is small, and the affected installation base is enormous. The EPSS score of 40.0% places CVE-2026-87902 in the 99th percentile — among the highest exploitation probabilities assigned to any vulnerability, and an order of magnitude above most entries in this KEV batch. No packaged exploit appears in the reference set, but the GitHub security advisory and the public reporting give attackers everything they need. Every internet-facing WordPress site that ran an affected version should be assumed to have been probed and should be checked for a planted web shell, not merely updated.

Remediation

  1. Carry out the action CISA requires, immediately. Apply mitigations in accordance with the WordPress project's instructions, comply with CISA's BOD 26-04 "Prioritizing Security Updates Based on Risk" guidance and the "Forensics Triage Requirements", and discontinue use of the product if mitigations are unavailable. The KEV remediation deadline of September 28, 2026 has already passed.
  2. Update WordPress to the fixed release in your branch. The project shipped fixes across every maintained branch — among them 4.7.37, 4.8.32, 4.9.33, 5.9.18, 6.4.12, 6.8.10, 6.9.9, 7.0.6 and 7.1.2 — as documented in GHSA-7hp8-65ch-5whp. Sites with automatic background updates enabled usually received the patch already; verify the version rather than assuming it.
  3. Verify every site you operate, not just the flagship one. The breadth of the affected range means forgotten staging copies, multisite installations and sites on shared hosting are the likely stragglers; enumerate all WordPress installations under your control with their versions and confirm each one is on a fixed release.
  4. Check for compromise, because probing started within hours. Review web server logs for unusual requests around template and page parameters, search the webroot for recently created or modified .php files (web shells typically appear in wp-content/uploads or theme directories), compare core files against the official checksums, look for unexpected administrator accounts, scheduled events and plugins, and rotate database credentials, salts in wp-config.php and all administrator passwords.
  5. Harden the PHP inclusion surface. Disable allow_url_include, keep allow_url_fopen off where possible, restrict PHP's open_basedir to the site's own directories so that no file outside them is readable for inclusion, prevent PHP execution inside upload directories at the web server level, and in your own code never derive an include path from request data — map input to a fixed allowlist instead.

Technical Details

WordPress resolves which template file to render through get_page_template(), and in the affected versions that resolution can be influenced so that it returns a path to a readable local .php file outside the active theme directories. The resulting include executes that file in the WordPress runtime context, which is the CWE-98 mechanism: the filename for an include statement is under external control, so the interpreter — not merely the file reader — acts on the attacker's choice. The advisory is explicit that full remote code execution depends on preconditions for both the server and the active theme, which is why NVD assigns High attack complexity despite the trivial reachability; the attacker needs a suitable .php file to be present and readable on the host, and the theme must take the code path that honours the chosen template. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H records the rest without qualification: remote, unauthenticated, no interaction, complete impact within the WordPress installation's own authority.

Frequently Asked Questions

Is CVE-2026-87902 being actively exploited?

Yes. CISA has added CVE-2026-87902 to the Known Exploited Vulnerabilities catalog, Patchstack observed attackers probing WordPress sites within hours of the patch, and the remediation deadline of September 28, 2026 has already passed. The EPSS score of 40.0% places the vulnerability in the 99th percentile for exploitation likelihood. Use in ransomware campaigns is not recorded in the KEV entry.

What products are affected by CVE-2026-87902?

CVE-2026-87902 affects WordPress Core across essentially its whole maintained history: versions below 4.7.37, and every branch from 4.8 through 7.1 below their respective fixed releases (for example 4.9.33, 5.9.18, 6.4.12, 6.8.10, 6.9.9, 7.0.6 and 7.1.2). Whether full code execution is achievable depends additionally on server configuration and the active theme.

How do I fix CVE-2026-87902?

Update WordPress to the fixed release in your branch, as listed in GHSA-7hp8-65ch-5whp; automatic background updates will have done this on many sites, but the version should be verified explicitly. Then check for compromise — scan the webroot for new .php files, compare core files against official checksums, review administrator accounts — and rotate database credentials, wp-config.php salts and admin passwords.

How severe is CVE-2026-87902?

CVE-2026-87902 is rated High with a CVSS 3.1 base score of 8.1: unauthenticated and remotely reachable with full impact on confidentiality, integrity and availability, scored below critical only because reaching code execution depends on server and theme preconditions. Its EPSS score of 40.0% in the 99th percentile is exceptionally high and reflects both the vast installation base and the immediate start of mass probing.

CVSS Score

8.1
HIGH(8.1)

EPSS Score

EPSS Score95.77%
EPSS Percentile99.9%

Dates

PublishedSeptember 22, 2026
Last ModifiedSeptember 28, 2026
StatusAnalyzed
CVSS Versionv3.1

Need Help With Vulnerability Management?

Our security experts can help you prioritize and remediate vulnerabilities effectively.