WordPress says an attacker can make get_page_template() include a readable local PHP file outside the active theme directories. Remote code execution is conditional on the active theme and server environment.WordPress published the advisory on 22 September 2026 and rates the flaw Critical. The fix is in WordPress 7.1.2, with security backports through the 4.7 branch. CISA added the CVE to its Known Exploited Vulnerabilities catalog on 25 September 2026.
What it allows
How Can CVE-2026-87902 Lead to Code Execution?
The flaw lets an unauthenticated request influence page-template resolution beyond the active theme directories. The result can be inclusion of a chosen local PHP file readable by the web server. WordPress describes code execution as possible only when the theme and server prerequisites also hold.
The active child or parent theme must have a top-level directory whose name begins with page-. WordPress names Twenty Twelve, Twenty Fourteen, Neve, Hestia, and Sydney as examples. The chosen local PHP file must exist and be readable by the web server account.
For the vendor-described PEAR-based code-execution path, register_argc_argv must be On. WordPress identifies the official PHP Docker image and default cPanel configurations using PHP before 8.5 as environments that can meet this condition. These examples do not mean every WordPress installation permits code execution.
Prioritize the affected site inventory in a Vulnerability Intelligence workflow. Keep the vendor version threshold and the deployment prerequisites as separate fields in that review.
CISA lists CVE-2026-87902 in KEV, which establishes documented exploitation of the vulnerability. It does not establish that every affected site meets the conditions for code execution. Brandefense Blackhole counted 53 dark-chat items mentioning this CVE from 26 August to 24 November 2026. The unit is a chat item, not a confirmed attack or unique actor.
GitHub search counted 26 public repositories naming CVE-2026-87902 on 24 November 2026. That unit is a repository name match, not a verified proof of concept or exploitation event. Keep the KEV catalog context separate from these research signals when prioritizing work.
Who is affected
Which WordPress Core Versions Need the Fix?
WordPress lists affected releases in every branch from 4.7.0 through 7.1.1. The first fixed release for each branch is listed below. Compare the running core version with its branch-specific threshold, including sites receiving backported security updates.
- 7.1.0 through 7.1.1: update to 7.1.2 or later in that branch.
- 7.0.0 through 7.0.5: update to 7.0.6 or later in that branch.
- 6.9.0 through 6.9.8: update to 6.9.9 or later in that branch.
- 6.8.0 through 6.8.9: update to 6.8.10 or later in that branch.
- 6.7.0 through 6.7.8: update to 6.7.9 or later in that branch.
- 6.6.0 through 6.6.8: update to 6.6.9 or later in that branch.
- 6.5.0 through 6.5.11: update to 6.5.12 or later in that branch.
- 6.4.0 through 6.4.11: update to 6.4.12 or later in that branch.
- 6.3.0 through 6.3.11: update to 6.3.12 or later in that branch.
- 6.2.0 through 6.2.12: update to 6.2.13 or later in that branch.
- 6.1.0 through 6.1.13: update to 6.1.14 or later in that branch.
- 6.0.0 through 6.0.15: update to 6.0.16 or later in that branch.
- 5.9.0 through 5.9.17: update to 5.9.18 or later in that branch.
- 5.8.0 through 5.8.16: update to 5.8.17 or later in that branch.
- 5.7.0 through 5.7.18: update to 5.7.19 or later in that branch.
- 5.6.0 through 5.6.20: update to 5.6.21 or later in that branch.
- 5.5.0 through 5.5.21: update to 5.5.22 or later in that branch.
- 5.4.0 through 5.4.22: update to 5.4.23 or later in that branch.
- 5.3.0 through 5.3.24: update to 5.3.25 or later in that branch.
- 5.2.0 through 5.2.27: update to 5.2.28 or later in that branch.
- 5.1.0 through 5.1.25: update to 5.1.26 or later in that branch.
- 5.0.0 through 5.0.28: update to 5.0.29 or later in that branch.
- 4.9.0 through 4.9.32: update to 4.9.33 or later in that branch.
- 4.8.0 through 4.8.31: update to 4.8.32 or later in that branch.
- 4.7.0 through 4.7.36: update to 4.7.37 or later in that branch.
For the conditional code-execution path, also inspect the active child and parent themes for a top-level directory beginning page-. Confirm whether the web server account can read local PHP files outside the theme directories. Review the PHP environment and the register_argc_argv setting for the vendor-described PEAR path.
Record each site core branch, active themes, PHP configuration, and remediation result in its patch management workflow. This inventory helps separate vulnerable versions from configurations that also meet the stated execution prerequisites.
Timeline
- 2026-09-22
WordPress published the advisory and branch-specific fixed versions.
- 2026-09-25
CISA added CVE-2026-87902 to its Known Exploited Vulnerabilities catalog.
What to do
-
Inventory WordPress sites and versions
Identify every running WordPress Core version, including older maintained branches. Prioritize exposed sites because CISA lists this CVE in KEV.
-
Apply the branch-specific security release
Update each site to the fixed release listed by WordPress for its branch, or to a later release carrying the fix. For example, use at least 7.1.2 on 7.1 and 6.9.9 on 6.9.
-
Verify the running version after rollout
Check the running WordPress Core version on every site after deployment and compare it with the fixed threshold for that branch. Record incomplete updates for follow-up.
-
Review theme and server prerequisites
Inspect the active child and parent themes for a top-level directory beginning page-. Review PHP configuration and whether the web server can read local PHP files outside theme directories.
-
Review evidence on exposed sites
Investigate unexpected page-template selection or PHP execution in application and server logs. This is a defensive review derived from the vendor-described path, not a vendor detection signature.
What Brandefense can do
- Watch your stack for exploited flaws
Name the vendors and products you run, and Brandefense alerts you when a CVE in them is exploited.
- See CVE-2026-87902 in Brandefense Atlas
The Atlas record of CVE-2026-87902: severity, exploitation status and the sources behind it.
- Vulnerability intelligence platform
Brandefense Vulnerability Intelligence follows which vulnerabilities attackers are using, so your team can patch what is under attack first.
Frequently Asked Questions
Does CVE-2026-87902 mean every WordPress site permits remote code execution?
No. WordPress says code execution depends on an active theme with a qualifying top-level directory and a readable local PHP target. The described PEAR path also requires the relevant PHP setting.
Is authentication required to trigger the page-template flaw?
WordPress describes the path traversal as unauthenticated. Whether it reaches code execution depends on the active theme and server environment.
Which WordPress release fixes the 7.1 branch?
WordPress lists 7.1.2 as the first fixed 7.1 release. It also lists fixed security backports for branches down to 4.7.
Does the CISA KEV listing prove code execution on our site?
No. KEV records known exploitation of the CVE. It does not establish that a particular deployment meets the theme and server prerequisites for the conditional code-execution path.