SecPod

Learn Search

Search across all Learn content

← Back to Security Research
No Account Needed: Critical WordPress Flaw (CVE-2026-87902) Lets Attackers Run Code on Some Servers — Patch Now

No Account Needed: Critical WordPress Flaw (CVE-2026-87902) Lets Attackers Run Code on Some Servers — Patch Now

Sep 23, 2026By Bapanapalli Prem Sai Siddhik

Summary

WordPress has released a security fix for CVE-2026-87902, an unauthenticated path traversal in page-template resolution. Under documented theme and server conditions, the inclusion can lead to remote code execution. The fix is available in WordPress 7.1.2, with backports across supported branches back to 4.7. Matching patched releases should be applied as soon as possible.

Vulnerability Details

CVE ID CVSS Score EPSS Score Type
CVE-2026-87902 9.2 (Critical) 0.68% CWE-98: Improper Control of Filename for Include Statement

Technical Information

Critical Unauthenticated No User Interaction Path Traversal Public PoC

CVE-2026-87902 — Unauthenticated Path Traversal in Page-Template Resolution

An unauthenticated attacker can influence page-template resolution so that WordPress includes a chosen readable local PHP file from outside the active theme directories. No account or user interaction is required.

Remote code execution is conditional. The active child or parent theme must contain a top-level directory whose name starts with page- (for example page-templates). That layout appears in some legacy default themes and certain third-party themes. A suitable local .php target must also exist and be readable by the web-server account; when PHP runs with register_argc_argv enabled, known PEAR entry points can complete the path to code execution on common hosting stacks.

Proof of Concept Analysis

A public proof-of-concept is available. At a high level, the flow is:

1. Public query input

Request parameters used in template selection are accepted without authentication.

2. Path material reaches template resolution

Crafted values are processed into template candidates that are not fully constrained to the theme directory tree.

3. Local file inclusion

A readable local PHP file outside the active theme directories can be included during page rendering.

4. Conditional code execution

When theme and server preconditions from the advisory are met, inclusion can lead to code execution under the web-server account.

Exploitation Flow (High-Level)

STEP 1
Public Query
Input
STEP 2
Template Path
Construction
STEP 3
Local File
Inclusion
STEP 4
Conditional
Code Execution

Authentication is not required. Code execution depends on theme and server preconditions documented in the advisory.

Impact

  • Local file inclusion
    An unauthenticated attacker can cause page-template resolution to include a readable local PHP file outside the active theme directories.
  • Conditional remote code execution
    When theme and server preconditions are met, inclusion can lead to code execution with the privileges of the web-server account, which may allow access to configuration, site data, or writable application resources.

Affected and Fixed Versions

Affected versions span WordPress 4.7.0 through 7.1.1. Fixed releases include:

  • 7.1.x → 7.1.2
  • 7.0.x → 7.0.6
  • 6.9.x → 6.9.9
  • 6.8.x → 6.8.10
  • 6.7.x → 6.7.9
  • 6.6.x → 6.6.9

The fix is backported to older eligible branches through 4.7.37. The full branch list is in the GitHub security advisory and WordPress 7.1.2 release notes. Only the most recent WordPress version is actively supported.

MITRE ATT&CK Mapping

Technique ID Technique Name Tactic
T1190 Exploit Public-Facing Application Initial Access
T1083 File and Directory Discovery Discovery

Mitigation and Recommendations

Updating to a patched release is the fix. WordPress does not offer a separate workaround.

  • Apply the fixed release for the branch in use. Sites with automatic background updates will start the process automatically; others can update from the dashboard under Updates or download from WordPress.org.
  • Where an immediate update is not possible, reducing exposure includes disabling register_argc_argv for web requests when it is not required, and removing unused web-readable PEAR entry points. Neither repairs the underlying flaw.
  • Review active child and parent themes for top-level directories whose names start with page-.
  • Limit the PHP process account’s filesystem write access where practical.

Action required: Apply the patched WordPress release as soon as possible. As of the advisory publication, there were no reports of in-the-wild use and no CISA KEV entry. A public proof-of-concept increases the likelihood of scanning against unpatched sites.

Instantly Fix Risks with Saner Patch Management

Saner patch management is a continuous, automated, and integrated solution that helps you quickly remediate risks, including critical third-party application updates. It supports Windows, Linux, macOS, and 550+ third-party applications.

You can stage patches in a safe testing environment before production deployment and roll back if needed.

Experience the fastest and most accurate patching software here.

Featured Posts

Open CVE-2022-0492: Linux Kernel cgroups Flaw, From Container to Host Root
CVE-2022-0492: Linux Kernel cgroups Flaw, From Container to Host Root

CVE Research

CVE-2022-0492: Linux Kernel cgroups Flaw, From Container to Host Root

Sep 22, 2026

Open CVE-2023-27351: The PaperCut Authentication Bypass That Became a Ransomware Gateway
CVE-2023-27351: The PaperCut Authentication Bypass That Became a Ransomware Gateway

CVE Research

CVE-2023-27351: The PaperCut Authentication Bypass That Became a Ransomware Gateway

Sep 22, 2026

Open Inside the ShinyHunters Playbook: From Credential Theft to Data Extortion
Inside the ShinyHunters Playbook: From Credential Theft to Data Extortion

CVE Research

Inside the ShinyHunters Playbook: From Credential Theft to Data Extortion

Sep 22, 2026

Open Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions
Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions

CVE Research

Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions

An analysis of seven vulnerabilities added to the CISA Known Exploited Vulnerabilities catalog on September 2, 2026, covering vulnerability types, remediation deadlines, and patch prioritization considerations.

Sep 18, 2026