WordPress security changelog
HIGH CVE-2026-87902 Analyzed

WordPress page-template resolution can include PHP outside active theme directories

An unauthenticated attacker can influence get_page_template() so page-template resolution includes a chosen readable local PHP file outside the active theme directories. Executing attacker-controlled PHP requires the relevant server and active-theme prerequisites, which are not specified; neither an upload primitive nor an unconditional remote-code-execution path is established by this record. The request parameter and entry route are unspecified. Affected versions: < 7.1.2. Confirmed fixed release: 7.1.2.

CVE / CNA score 8.1 CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0
NVD score Pending NVD has not published its own CVSS assessment.
Component
WordPress
Plugin slug
Core
Affected
< 7.1.2
Safe version
7.1.2
Published
Sep 22, 2026
Weakness
CWE-98 — Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')

This CVE was published Sep 22, 2026 and is one of 51 known issues for WordPress core.

Update, patch or deactivate.

Update to 7.1.2 or later. Update WordPress core. Resolve templates only from an explicit allowlist inside the permitted theme directories, checking the canonical path before inclusion. Prevent untrusted files from becoming executable templates and review unexpected template settings or PHP files.

A safe version is available, so updating to that version or later is the preferred remediation. If an immediate update is not practical, consider a targeted application patch or temporarily restricting the affected functionality.

Deactivate only when warranted by your risk profile, or when advised by your hosting provider in the limited circumstances where the vulnerability cannot otherwise be mitigated. If you’re unsure which action is appropriate, contact Fused or your hosting provider for guidance.

Technical 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.

CVE / CNA vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary and upstream sources