WordPress 7.1.2 fixes critical unauthenticated path traversal vulnerability (CVE-2026-87902)
WordPress 7.1.2 fixes a critical unauthenticated path traversal flaw (CVE-2026-87902) that could allow remote code execution.
WordPress released version 7.1.2 to address a critical unauthenticated path traversal vulnerability (CVE-2026-87902). The flaw allows an attacker to load and execute arbitrary PHP files from outside the site's active theme folders, potentially leading to remote code execution. All WordPress versions from 4.7.0 through 7.1.1 are affected, and users should update immediately.
- WordPress 7.1.2 fixes a critical unauthenticated path traversal vulnerability (CVE-2026-87902).
- The flaw allows attackers to load and execute arbitrary PHP files from outside the active theme folder.
- All versions from 4.7.0 to 7.1.1 are affected, and immediate updates are recommended.
Vulnerabilities mentionedAll →
- CVE-2026-879028.118%Unauthenticated Local File Inclusion to RCE in WordPress Core (fixed in 7.1.2)published · WordPress (WordPress.org) WordPress core KEV PoC ×16
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected |
|---|
Full article288 words · extracted from helpnetsecurity.com · click to collapse
WordPress released version 7.1.2 to fix a critical flaw that lets an unauthenticated attacker make the software load a PHP file of the attacker’s choosing from outside the site’s active theme folders. On sites where the server and the active theme meet certain conditions, the attacker can go on to run code on the server.

The project tracks the flaw as CVE-2026-87902 and lists every release from 4.7.0 through 7.1.1 as affected. The attacker needs no account on the site and no action from anyone who has one.
Because this is a security release, it is recommended that you update your sites immediately.
What the bug does
The bug sits in get_page_template(), the function WordPress uses to pick the theme file that renders a page. An attacker can steer that lookup to a readable .php file elsewhere on the server. This is a path traversal bug, meaning the request walks out of the directory the code expected to stay in. WordPress then includes the file, and PHP runs the code inside it.
WordPress rated the flaw 9.2 out of 10 on version 4 of CVSS, the common scale for vulnerability severity. The score assumes an attacker working over the network, with low complexity, no privileges and no user interaction.
Who gets the patch
The fix ships in 7.1.2 and in 24 older branches, from 7.0.6 down to 4.7.37. Sites that accept automatic background updates will start the update on their own, and others can update from the Updates screen in the Dashboard.
“As a courtesy, the security fix was backported to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported,” WordPress noted.
Text extracted automatically; images, tables and formatting may be missing. Original: https://www.helpnetsecurity.com/2026/09/23/cve-2026-87902-wordpress-7-1-2-security-release/