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.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run WordPress core and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. No service restart needed; PHP picks up the new core files on the next request (clear OPcache/page caches if used).
  4. Because this flaw is being exploited, also check the server for signs of compromise.

Affected and fixed versions

Affected:

Fixed in:

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 wordpress
Ubuntu
sudo apt update
sudo apt install --only-upgrade wordpress
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh wordpress (EPEL)
Fedora
sudo dnf upgrade --refresh wordpress
SUSE / openSUSE
not packaged
Amazon Linux
not packaged: upstream
Arch Linux
sudo pacman -Syu
Alpine
not packaged
FreeBSD
pkg update && pkg upgrade wordpress
Built 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 version

General 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

ReleasePackageStatusFixed version / advisory
Debian 12wordpressnot fixed yet
Debian 13wordpressfixed6.8.10+dfsg1-0+deb13u1
Debian testingwordpressfixed7.1.2+dfsg1-1
Debian 13 (trixie)wordpressfixed6.8.10+dfsg1-0+deb13u1 (DSA-6525-1)
Debian unstable (sid)wordpressfixed7.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

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.