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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| WordPress | WordPress | < 7.1.2 | 7.1.2 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | wordpress | 7.1.2+dfsg1-1 | — |
| Debian 13 | wordpress | 6.8.10+dfsg1-0+deb13u1 | — |
| Debian 12 | wordpress | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | wordpress | No fix yet | — |
| Ubuntu 26.04 LTS | wordpress | No fix yet | — |
| Ubuntu 24.04 LTS | wordpress | No fix yet | — |
| Ubuntu 22.04 LTS | wordpress | No fix yet | — |
| Ubuntu 20.04 LTS | wordpress | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | wordpress | No fix yet | — |
| Ubuntu 16.04 LTS | wordpress | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- WordPress 7.0.2 - Path Travesal EDB-52690 · webapps · Oct 1, 2026
GitHub 24 repositories · most starred shown
-
ressl/cve-2026-87902-poc ★ 46 · Sep 22, 2026
PoC for CVE-2026-87902 — unauthenticated path traversal in WordPress page-template resolution (local PHP inclusion, conditional RCE) with a pinned vulnerable lab
-
abraxas/CVE-2026-87902 ★ 36 · Sep 22, 2026
CVE-2026-87902 - WordPress - WordPress Core - Critical 9.2 - Unauthenticated Local File Inclusion (conditional RCE)
-
tc4dy/CVE-2026-87902-Toolkit ★ 15 · Sep 23, 2026
CVE-2026-87902 – WordPress Core LFI→RCE Toolkit (CVSS 9.2) - Red/Blue Team suite for WordPress 4.7–7.1.1. | 2 tools: Full Exploit (LFI, PEAR RCE, admin create, webshell, reverse shell, loot, mass sca…
-
dinosn/cve-2026-87902-wordpress-lfi-lab ★ 13 · Sep 23, 2026
Reproduction lab + URL-list scanner + PoC for CVE-2026-87902 / GHSA-7hp8-65ch-5whp — WordPress get_page_template() unauthenticated LFI to conditional RCE (WP 4.7.0-7.1.1, fixed 7.1.2). Authorized/def…
-
vulpecuna/CVE-2026-87902 ★ 9 · Sep 22, 2026
Unauthenticated RCE on Wordpress
-
tonydelouvre/CVE-2026-87902 ★ 5 · Sep 29, 2026
XWP_RCE — CVE-2026-87902 Hacker Console
-
HackfutSecRoot/CVE-2026-87902 ★ 3 · Sep 28, 2026
CVE-2026-87902 — WordPress Core LFI → RCE by Hackfut
-
crowsec-edtech/CVE-2026-87902 ★ 3 · Sep 25, 2026
Proof of concept for vulnerability CVE-2026-87902 in Wordpress
-
ynsmroztas/WPSniper ★ 3 · Sep 23, 2026
CVE-2026-87902 detector. WordPress get_page_template LFI class. Detect-only. Authorized lab.
-
Hassham1/CVE-2026-87902 ★ 2 · Sep 23, 2026
WordPress Core <= 7.1.1 unauthenticated LFI to RCE - validation lab, PoC, nuclei template (GHSA-7hp8-65ch-5whp)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- WordPress Core - PHP Template Path Traversal http/cves/2026/CVE-2026-87902.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Advisories 2
- WID-SEC-2026-3539 WordPress: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Sep 28, 2026
- NCSC-2026-0389 Kwetsbaarheid verholpen in WordPress NCSC-NL (Netherlands) · Sep 24, 2026