High 8.1 Actively Exploited

WordPress get_page_template RCE actively exploited (CVE-2026-87902) [PoC]

CVE-2026-87902

By Yazoul AI · automated

CVE-2026-87902: unauthenticated attackers exploit WordPress get_page_template() to include a local PHP file and achieve RCE (CVSS 8.1). Patch now, KEV-listed.

Actively exploited in the wild - CVE-2026-87902 is a high-severity remote code execution vulnerability in WordPress that lets an unauthenticated attacker force get_page_template() page-template resolution to include a chosen readable local .php file outside the active theme directories. When the server and active theme pre-conditions are met, this leads to remote code execution.

Overview

WordPress resolves which template file renders a page through a function called get_page_template(). In CVE-2026-87902, an unauthenticated attacker can manipulate that resolution so the function includes a .php file of the attacker’s choosing from somewhere on the local filesystem, outside the active theme directories. Normally this resolution is constrained to theme folders; this bug breaks that constraint.

The severity is HIGH (CVSS 8.1). The vector is NETWORK, meaning an attacker reaches the target over the internet. No privileges and no user interaction are required - the attacker needs nothing but network access. The Attack Complexity is HIGH, which reflects the pre-conditions: the target server and the active theme must both satisfy specific requirements before the include turns into full code execution. When those conditions line up, the result is RCE. When they do not, the attacker may still be able to include and render a chosen local PHP file, which can leak file contents or trigger unintended behavior. CISA has added this CVE to its Known Exploited Vulnerabilities catalog.

Impact

For a site that meets the pre-conditions, an unauthenticated attacker can execute arbitrary PHP on the server. That means full compromise of the WordPress installation: reading or exfiltrating the database and configuration files, creating admin accounts, installing persistent backdoors, and pivoting to other services reachable from the host. Because no authentication is needed, mass exploitation is trivial once a working chain is public - and exploitation is already confirmed in the wild. Any site running an affected WordPress version and theme should treat itself as potentially compromised until proven otherwise.

Remediation and Mitigation

  • Apply the vendor patch for CVE-2026-87902 as soon as it is available for your WordPress core version. Check the official WordPress security release notes for the fixed build.
  • If you cannot patch immediately, restrict access to the site (IP allowlisting, maintenance mode with authentication) and deploy WAF rules that block crafted requests targeting template resolution.
  • Audit for compromise: review recently modified files, unexpected administrator accounts, and unfamiliar scheduled tasks. Reset credentials and rotate salts and keys.
  • Review themes and plugins - the active theme is part of the precondition, so keep all components updated and remove abandoned ones.
  • Monitor logs for unusual include paths and repeated requests to index.php with manipulated query parameters.

Breach reports from past WordPress incidents are available at breach reports, and ongoing coverage is at security news.

Security Insight

This case shows how a single “resolution” helper in a CMS core can become an RCE primitive when paired with the right theme and server configuration - the kind of chained precondition that turns a hard-to-exploit bug into a mass-exploitation event once a working sequence surfaces. WordPress has historically been resilient against unauthenticated RCE, but its huge install base and the sheer variety of themes mean that conditional bugs like CVE-2026-87902 are functionally universal for some subset of sites. The fast move to the KEV catalog is the real signal: attackers found the preconditions at scale, and defenders should assume the same will happen to the next template-resolution quirk.

Further Reading

Share:

Never miss a critical vulnerability

Get real-time security alerts delivered to your preferred platform.

Public PoC References

Unverified third-party code

These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).

Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.

Repository Stars
ressl/cve-2026-87902-poc

PoC for CVE-2026-87902 — unauthenticated path traversal in WordPress page-template resolution (local PHP inclusion, conditional RCE) with a pinned vulnerable lab

★ 30
abraxas/CVE-2026-87902

CVE-2026-87902 - WordPress - WordPress Core - Critical 9.2 - Unauthenticated Local File Inclusion (conditional RCE)

★ 29
vulpecuna/CVE-2026-87902

Unauthenticated RCE on Wordpress

★ 9
Hassham1/CVE-2026-87902

WordPress Core <= 7.1.1 unauthenticated LFI to RCE - validation lab, PoC, nuclei template (GHSA-7hp8-65ch-5whp)

★ 1
rabakuku/CVE-2026-87902-A-working-PoC-for-WordPress-s-critical-path-traversal

Critical Zero-Authentication Vulnerability Alert! CVE-2026-87902 carries a massive CVSS 9.2 rating affecting nearly every version of WordPress Core from 4.7.0 up through 7.1.1. how attackers chain it

★ 0

Showing 5 of 11 known references. Source: nomi-sec/PoC-in-GitHub.

Nuclei Detection Templates

Detection template available — your exposure is being scanned

The templates below are YAML signatures for the Nuclei scanner from ProjectDiscovery. They are not exploit code — they are detection rules that confirm whether a target is vulnerable. The presence of a Nuclei template means every bug bounty hunter, AppSec team, red team, and reconnaissance pipeline on the public internet is actively probing for this CVE.

Assume your exposed instances have already been touched. Patch immediately even if no exploitation is observed yet — fingerprinting precedes exploitation by days at most.

Template Source
CVE-2026-87902.yaml View YAML

1 Nuclei template indexed for this CVE. Source: projectdiscovery/nuclei-templates.

Related Advisories

Never Miss a Critical Alert

CVE advisories, breach reports, and threat intel — delivered daily to your inbox.