Security Advisory

CVE-2026-87902: WordPress Core Page-Template Remote File Inclusion RCE (KEV)

Last updated:
  • CVE-2026-87902

CVE-2026-87902 is a remote file inclusion vulnerability in WordPress Core's page-template resolution that lets an unauthenticated attacker point at a readable local PHP file outside the theme directory, and it can lead to remote code execution when the active theme has a 'page-' prefixed top-level directory and a usable local PHP file exists on the server; CISA added it to KEV days after disclosure once scanning for it began.

Vulnerability summary

CVSS base score

8.1

High severity

EPSS score (FIRST)

95.8%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

Yes

Listed as known exploited

Published

Vulnerability ID: CVE-2026-87902 · Source: NVD

Affected components

ComponentCPEVersion range
WordPress Corecpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*Before 4.7.37, and every minor branch 4.8 through 7.1 before its patched release (4.8.32, 4.9.33, 5.0.29, 5.1.26, 5.2.28, 5.3.25, 5.4.23, 5.5.22, 5.6.21, 5.7.19, 5.8.17, 5.9.18, 6.0.16, 6.1.14, 6.2.13, 6.3.12, 6.4.12, 6.5.12, 6.6.9, 6.7.9, 6.8.10, 6.9.9, 7.0.6, 7.1.2); fixed from 7.1.2 / the corresponding patched point release on each branch

What does this mean for affected devices?

CVE-2026-87902 is a remote file inclusion (CWE-98) vulnerability in WordPress Core. The official GitHub Security Advisory states that "an unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file outside the active theme directories," and that this "can lead to RCE" if the relevant preconditions on both the server and the active theme are met (WordPress Security Advisory GHSA-7hp8-65ch-5whp).

The advisory names two concrete preconditions: the active child or parent theme must contain a top-level directory whose name starts with page- (themes it lists as affected in this way include Twenty Twelve, Twenty Fourteen, Neve, Hestia and Sydney), and a chosen local .php target file must exist on the server and be readable by the web-server account — for example pearcmd.php when it is present, as it is in Docker's official PHP image or default cPanel setups (WordPress Security Advisory GHSA-7hp8-65ch-5whp).

NVD lists this CVE with status "Analyzed" and a CVSS v3.1 base score of 8.1 (high), vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H — network-reachable and unauthenticated, but with high attack complexity reflecting the theme/file preconditions above (NVD).

The fix landed across every actively supported branch at once: WordPress Core before 4.7.37 and every minor line from 4.8 through 7.1 has a patched point release (full per-branch list in the affected-versions field above), with WordPress 7.1.2 as the current latest (WordPress Security Advisory GHSA-7hp8-65ch-5whp).

CISA added CVE-2026-87902 to the Known Exploited Vulnerabilities (KEV) catalog on 2026-09-25, three days after the advisory's publication, with a required-action due date of 2026-09-28 — security firm Patchstack has reported (third-party, not WordPress-confirmed) that it observed scanning activity targeting the flaw within hours of the patch going out (CISA KEV; Patchstack).

As of 2026-10-27, FIRST scores the probability of exploitation at 0.95769 (99.871th percentile) — an unusually high score reflecting the scale of WordPress's install base and the speed of post-patch scanning (FIRST EPSS).

Sites should update WordPress Core to the patched release for their branch immediately; sites on a theme with a page- prefixed directory and any locally-reachable .php utility file (such as pearcmd.php under common Docker/cPanel PHP configurations) should treat this as actively exploited and check for signs of prior compromise.

How to fix this class of issueThis advisory's weakness class is Path traversal. Our practical guide covers how to detect, fix, verify and disclose it: How to fix path traversal in embedded firmware.

Evidence

  • Unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file outside the active theme directories, which can lead to RCE given theme and server preconditions. — WordPress Security Advisory GHSA-7hp8-65ch-5whp
  • CVSS v3.1 base score is 8.1 (high), vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, NVD status Analyzed. — NVD
  • Preconditions: active theme has a top-level directory starting with 'page-' (e.g. Twenty Twelve, Twenty Fourteen, Neve, Hestia, Sydney) and a readable local .php target file exists (e.g. pearcmd.php under Docker's official PHP image or default cPanel). Fixed across every branch 4.7.37 through 7.1.2. — WordPress Security Advisory GHSA-7hp8-65ch-5whp
  • Added to the CISA Known Exploited Vulnerabilities catalog on 2026-09-25, due date 2026-09-28. — CISA KEV
  • EPSS score is 0.95769 (99.871th percentile) as of 2026-10-27. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. CISA KEV
  3. WordPress Security Advisory GHSA-7hp8-65ch-5whp
  4. FIRST EPSS

Frequently asked questions

What is CVE-2026-87902?

CVE-2026-87902 is a remote file inclusion vulnerability in WordPress Core's page-template resolution that lets an unauthenticated attacker point at a readable local PHP file outside the theme directory, and it can lead to remote code execution when the active theme has a 'page-' prefixed top-level directory and a usable local PHP file exists on the server; CISA added it to KEV days after disclosure once scanning for it began.

How severe is CVE-2026-87902?

NVD scores CVE-2026-87902 8.1 out of 10 on the CVSS scale — a high severity rating.

Is CVE-2026-87902 being actively exploited?

Yes — CVE-2026-87902 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, meaning CISA has confirmed evidence of active exploitation in the wild.

What is affected by CVE-2026-87902?

CVE-2026-87902 affects WordPress Core.

Where does this CVE-2026-87902 information come from?

This advisory is based on NVD, CISA KEV, WordPress Security Advisory GHSA-7hp8-65ch-5whp, and FIRST EPSS, cited in full in the Sources section above.