CVE-2026-87902: WordPress core page-template path traversal, conditional RCE
Exploited in the wild High 8.1 EPSS 95.8% WordPress core
An unauthenticated attacker can make WordPress get_page_template() include a chosen readable local .php file outside the theme directories. It becomes remote code execution when the active (parent or child) theme has a top-level directory whose name starts with page- (e.g. Twenty Twelve, Twenty Fourteen, Neve, Hestia, Sydney) and a usable PHP file such as pearcmd.php is readable with register_argc_argv=On (true for the official php Docker image and default cPanel with PHP before 8.5). Fixed in WordPress 7.1.2 with backports to every branch down to 4.7; CISA added it to the Known Exploited Vulnerabilities catalog on 2026-09-25.
- CVE-2026-87902CVE identifier
- 8.1CVSS 3.1 base score (high)
- 2026-09-25added to CISA's exploited list (US federal deadline 2026-09-28)
- 95.8%EPSS: chance of exploitation in the next 30 days (higher than 100% of CVEs)
- 2026-09-22published
What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms
What to do now
- Check whether you run WordPress core and which version (commands below).
- Install the fixed version for your system: see “Patch it” below.
- No service restart needed; PHP picks up the new core files on the next request (clear OPcache/page caches if used).
- Because this flaw is being exploited, also check the server for signs of compromise.
Affected and fixed versions
Affected:
- WordPress 7.1.0 - 7.1.1
- WordPress 7.0.0 - 7.0.5
- WordPress 6.9.0 - 6.9.8
- WordPress 6.8.0 - 6.8.9
- WordPress 6.7.0 - 6.7.8
- WordPress 6.6.0 - 6.6.8
- WordPress 6.5.0 - 6.5.11
- WordPress 6.4.0 - 6.4.11
- WordPress 6.3.0 - 6.3.11
- WordPress 6.2.0 - 6.2.12
- WordPress 6.1.0 - 6.1.13
- WordPress 6.0.0 - 6.0.15
- WordPress 5.9.0 - 5.9.17
- WordPress 5.8.0 - 5.8.16
- WordPress 5.7.0 - 5.7.18
- WordPress 5.6.0 - 5.6.20
- WordPress 5.5.0 - 5.5.21
- WordPress 5.4.0 - 5.4.22
- WordPress 5.3.0 - 5.3.24
- WordPress 5.2.0 - 5.2.27
- WordPress 5.1.0 - 5.1.25
- WordPress 5.0.0 - 5.0.28
- WordPress 4.9.0 - 4.9.32
- WordPress 4.8.0 - 4.8.31
- WordPress 4.7.0 - 4.7.36
Fixed in:
- WordPress 7.1.2
- 7.0.6
- 6.9.9
- 6.8.10
- 6.7.9
- 6.6.9
- 6.5.12
- 6.4.12
- 6.3.12
- 6.2.13
- 6.1.14
- 6.0.16
- 5.9.18
- 5.8.17
- 5.7.19
- 5.6.21
- 5.5.22
- 5.4.23
- 5.3.25
- 5.2.28
- 5.1.26
- 5.0.29
- 4.9.33
- 4.8.32
- 4.7.37
Am I affected?
wp core version
grep wp_version wp-includes/version.php
dpkg -l wordpress | grep ^ii
Patch it
Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.
Debian
sudo apt update
sudo apt install --only-upgrade wordpressUbuntu
sudo apt update
sudo apt install --only-upgrade wordpressRHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh wordpress (EPEL)Fedora
sudo dnf upgrade --refresh wordpressSUSE / openSUSE
not packagedAmazon Linux
not packaged: upstreamArch Linux
sudo pacman -SyuAlpine
not packagedFreeBSD
pkg update && pkg upgrade wordpressBuilt from source
# WP-CLI, run in the WordPress root as the site owner
wp core update
# staying on an older branch: update to that branch's fixed point release
wp core update --minor
wp core versionGeneral update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.
Fix status in Linux distributions
| Release | Package | Status | Fixed version / advisory |
|---|---|---|---|
| Debian 12 | wordpress | not fixed yet | |
| Debian 13 | wordpress | fixed | 6.8.10+dfsg1-0+deb13u1 |
| Debian testing | wordpress | fixed | 7.1.2+dfsg1-1 |
| Debian 13 (trixie) | wordpress | fixed | 6.8.10+dfsg1-0+deb13u1 (DSA-6525-1) |
| Debian unstable (sid) | wordpress | fixed | 7.1.2+dfsg1-1 |
From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.
CISA 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.
https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp ; ; BOD 26-04: https://www.cisa.gov/news-events/directives/bod-26-04-prioritizing-security-updates-based-risk ; Forensics Triage Requirements: https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk ; https://nvd.nist.gov/vuln/detail/CVE-2026-87902
Sources
- WordPress security advisory GHSA-7hp8-65ch-5whp
- Debian security tracker CVE-2026-87902
- Ubuntu CVE-2026-87902 (status: needs evaluation)
- WP-CLI wp core update
- CVE record CVE-2026-87902
- CVE-2026-87902 on CVE.org
- CVE-2026-87902 on NVD
- CISA Known Exploited Vulnerabilities catalog
Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.