CTIPilot
AI-generated · no human review · verify critical claims against the linked source. how it works →

WordPress Core: unauthenticated page-template path traversal to conditional RCE, actively exploited within 24h of patch with a named public Nuclei template

cve · CVE-2026-87902

Coverage
1
first 2026-09-24 → last 2026-09-24
Latest activity
2026-09-24
WordPress's fix for a pre-auth file-inclusion bug is already outrun by a public Nuclei template and confirmed…
Peak priority
critical
1 critical
Targets
public-sector
sectors: public-sector
Sources cited
4
4 hosts

Action items (3)

Do-now tasks recorded on the entries about CVE-2026-87902, newest first. Check the date before acting on an older one.

  • Immediate action: WordPress fixed CVE-2026-87902 on 2026-09-22 (7.1.2, with matching security backports on every branch back to 4.7.37), and within 24 hours Patchstack recorded confirmed pearcmd-based file-write exploitation attempts plus a named public Nuclei template now driving traffic at more than ten times the first evening's volume. Update to the branch-appropriate fixed release immediately. Where an update cannot land same-day, block traversal sequences in the pagename request parameter at the WAF/reverse-proxy layer (a real page slug never contains one) and disable register_argc_argv for web-facing PHP to break the pearcmd escalation path without yet fixing the underlying inclusion.
    2026-09-24CVE-2026-87902
  • Patch every WordPress install (any version from 4.7.0 through 7.1.1) to its branch's fixed release now; where same-day patching is not possible, block pagename values containing percent-encoded traversal sequences at the WAF/reverse-proxy layer and disable register_argc_argv for web-facing PHP.
    2026-09-24CVE-2026-87902
  • Check /tmp and /var/tmp on every WordPress host that was internet-reachable and unpatched since 2026-09-22 for unexpected .php files; their presence means a file-write attempt already succeeded and the host must be treated as compromised, not merely probed.
    2026-09-24CVE-2026-87902

Defender insights

What each entry about CVE-2026-87902 tells a defender to do, newest first.

2026-09-24CRITICALexploitedWordPress's fix for a pre-auth file-inclusion bug is already outrun by a public Nuclei template and confirmed file-write attempts

Triage · detection

Story timeline

  1. 2026-09-24CVE-2026-87902, WordPress Core: unauthenticated page-template path traversal to conditional remote code execution, weaponised within a day (CVSS4.0 9.2)
    deep-diveWordPress's fix for a pre-auth file-inclusion bug is already outrun by a public Nuclei template and confirmed file-write attempts
ATT&CK techniques (3 across 3 tactics)

3 techniques observed across 1 entry about this entity, derived from entry metadata and body evidence, never asserted without a published entry behind it · pinned to MITRE ATT&CK v19.2 · compare on the matrix · Navigator layer (JSON)

  • ReconnaissanceActive Scanning: Vulnerability Scanning
  • Initial AccessExploit Public-Facing Application
  • PersistenceServer Software Component: Web Shell

Reconnaissance TA0043

T1595.002Active Scanning: Vulnerability Scanning×1

Adversaries may scan victims for vulnerabilities that can be used during targeting. Vulnerability scans typically check if the configuration of a target host/application (ex: software and version) potentially aligns with the target of a specific exploit the adversary may seek to use.

Evidence: 2026-09-24/wordpress-cve-2026-87902-page-template-traversal-rce · ATT&CK page ↗

Initial Access TA0001

T1190Exploit Public-Facing Application×1

Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network. The weakness in the system can be a software bug, a temporary glitch, or a misconfiguration.

Evidence: 2026-09-24/wordpress-cve-2026-87902-page-template-traversal-rce · ATT&CK page ↗

Persistence TA0003

T1505.003Server Software Component: Web Shell×1

Adversaries may backdoor web servers with web shells to establish persistent access to systems. A Web shell is a Web script that is placed on an openly accessible Web server to allow an adversary to access the Web server as a gateway into a network. A Web shell may provide a set of functions to execute or a command-line interface on the system that hosts the Web server.

Evidence: 2026-09-24/wordpress-cve-2026-87902-page-template-traversal-rce · ATT&CK page ↗

Entries about WordPress Core: unauthenticated page-template path traversal to conditional RCE, actively exploited within 24h of patch with a named public Nuclei template (1)

2026-09-24 · view entry permalink →

CRITICALCVE-2026-87902exploitedNATOA1

CVE-2026-87902, WordPress Core: unauthenticated page-template path traversal to conditional remote code execution, weaponised within a day (CVSS4.0 9.2)

CVE-2026-87902 is an unauthenticated path-traversal flaw in WordPress Core's page-template resolution that lets a remote attacker force get_page_template() to include a chosen, readable local PHP file from outside the active theme's directories (WordPress Security Team, 2026-09-22). The request pairs two public query variables, pagename and page_id, which WordPress accepts from an anonymous form POST (Robert Ressl, 2026-09-22); Patchstack's observed traffic shows the same fields also work over a GET request, with POST later overtaking GET as the more common method (Patchstack, 2026-09-23), with no account, cookie, session or nonce required (Robert Ressl, 2026-09-22). A valid page_id is what makes the request resolve to a real page at all: without one the query 404s and the vulnerable template-resolution code never runs, so the pairing is not padding but a load-bearing part of the chain (Patchstack, 2026-09-23). WordPress's own slug sanitiser preserves percent-encoded octets while rewriting literal dots and truncating at literal slashes (Patchstack, 2026-09-23), so a double-encoded traversal sequence reaches query processing with its percent-encoded octets still present, and the encoded separators are not treated as ordinary path separators at that point (Robert Ressl, 2026-09-22); get_page_template() then calls urldecode() on the surviving value, turning the encoded characters into a live ../ sequence at the moment the template candidate is built, and the loader that resolves the final path checks only that the target exists, is readable and carries the expected suffix; never that the resolved path stays inside an allowed theme directory (Robert Ressl, 2026-09-22). "The important distinction is between canonicalization and containment. Resolving a path with realpath() gives a normalized destination. It does not establish that the destination belongs to a directory the application intended to trust" (Robert Ressl, 2026-09-22).

Reaching code execution, not just file inclusion, needs two further conditions on top of the traversal itself: the active theme (parent or child) must contain a top-level directory whose name starts with page- (the advisory names the legacy Twenty Twelve and Twenty Fourteen themes and third-party themes Neve, Hestia and Sydney as examples) and a .php target file must exist on the server and be readable by the web server account (WordPress Security Team, 2026-09-22). The demonstrated route uses PHP's PEAR pearcmd.php entry point, present by default in the official PHP Docker image and in cPanel installs on PHP versions before 8.5 (WordPress Security Team, 2026-09-22), the discoverer's own lab used the wordpress:php8.3-apache tag specifically (Robert Ressl, 2026-09-22); with register_argc_argv enabled, the query string reaches the included script as $argv, letting an attacker issue pearcmd's config-create action to write an attacker-chosen PHP file to /tmp or /var/tmp (Patchstack, 2026-09-23), code execution with the privileges of the PHP or web-server account (Robert Ressl, 2026-09-22). WordPress shipped 7.1.2 for the 7.1 branch on 2026-09-22 and backported the fix to every other branch back to 4.7.37, so no affected site needs a forced major-version jump to patch (WordPress Security Team, 2026-09-22).

Exploitation moved fast. The first requests hit Patchstack's sensors at 11:49 UTC on 2026-09-22, the same day the patch shipped, using the exact encoding the fix addresses; evidence the payloads were built from the patch diff, not an independent rediscovery (Patchstack, 2026-09-23). What began as reconnaissance-only probing (pointing the inclusion at a harmless core file such as wp-links-opml.php to see if the host answers) escalated within a day into confirmed exploitation: "Attackers are now including pearcmd.php and using it to write PHP files to disk, and public scanning tooling for this CVE is in circulation" (Patchstack, 2026-09-23). Some observed payloads write a harmless marker string consistent with building a vulnerable-host list; others write a short tag that executes a shell command on access. Traffic is now spread across a few hundred source addresses and running at more than ten times the first evening's volume, and it has been commoditised: "A named Nuclei template means this is no longer a handful of operators working from the patch diff. It is in general circulation and anyone can point it at a host list" (Patchstack, 2026-09-23).

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 environment and the active theme are met, this can lead to RCE.

WordPress Security Team (GHSA-7hp8-65ch-5whp) 2026-09-22

Attackers are now including pearcmd.php and using it to write PHP files to disk, and public scanning tooling for this CVE is in circulation.

A named Nuclei template means this is no longer a handful of operators working from the patch diff. It is in general circulation and anyone can point it at a host list.

Patchstack 2026-09-23

The important distinction is between canonicalization and containment. Resolving a path with realpath() gives a normalized destination. It does not establish that the destination belongs to a directory the application intended to trust.

Robert Ressl
vulnerability24 Sep 04:30Zmulti-sourceOpen finding →

Co-occurring entities

Derived: referenced by the same focused operational entries (weekly summaries and report roundups don't count); ×N counts the shared entries.

Where this entity is cited

  • Deep dive1

Source distribution

  • github.com1 (25%)
  • patchstack.com1 (25%)
  • ressl.ch1 (25%)
  • wordfence.com1 (25%)