PHP2Shell : See if you’re affected with a free external attack surface scan. Click Here > 

New CVE Detected

CVE-2026-87902 – Unauthenticated LFI to RCE – WordPress Core 4.7.0–7.1.1

Be the first to know when new zero-days emerge:

Summary

CVE-2026-87902 is a Local File Inclusion vulnerability in WordPress core’s page-template resolution logic, affecting all WordPress installations from version 4.7.0 through 7.1.1. An unauthenticated remote attacker can abuse the get_page_template() function to force inclusion of an arbitrary readable local .php file located outside the active theme’s directories. Under specific server and theme conditions this can escalate to full remote code execution, and the flaw carries a NVD-reported CVSS v3.1 score of 8.1 (High).

Technical details

  • Root cause: Improper restriction of the file path used by get_page_template() when resolving page templates (CWE-98, PHP Remote/Local File Inclusion) allows path traversal outside the active theme directory.
  • Trigger conditions: Exploitation requires the active (child or parent) theme to contain a top-level directory whose name begins with page- (e.g. page-templates), a pattern present in themes such as Twenty Twelve, Twenty Fourteen, Neve, Hestia, and Sydney.
  • Attack vector: Fully network-based and unauthenticated — no login, privileges, or user interaction are required to reach the vulnerable code path.
  • Impact: At minimum, disclosure/inclusion of arbitrary readable PHP files on the server. Full remote code execution is possible when a suitable "gadget" PHP file is reachable and includable — the advisory specifically calls out pearcmd.php combined with PHP’s register_argc_argv setting enabled (a default in some official PHP Docker images and certain older cPanel configurations) as a known RCE chain.

Affected software

  • WordPress core, all versions from 4.7.0 up to and including 7.1.1
  • Exploitability additionally depends on the active theme containing a page--prefixed top-level directory and on server-side PHP configuration/file availability

Severity

  • CVSS v3.1 Base Score: 8.1 (High)
  • Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network, Attack Complexity: High, Privileges Required: None, User Interaction: None, Confidentiality/Integrity/Availability Impact: High

Mitigation and recommended actions

  • Immediate: Update WordPress to the patched release for your branch — 7.1.2, 7.0.6, 6.9.9, 6.8.10, or the corresponding backported fix down through 4.7.37. Updates can be applied via the WordPress Dashboard, automatic background updates, or manual download from WordPress.org.
  • If immediate patching is not possible:
    • Review the active theme for any top-level directory beginning with page- and rename or remove it if not required.
    • Check whether register_argc_argv is enabled in the server’s PHP configuration and disable it if not needed.
    • Restrict or remove access to pearcmd.php and other unnecessary PHP files reachable on the filesystem.
    • Prioritize upgrading immediately regardless of interim mitigations, since only the latest supported version line receives full protection going forward.

References

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

How IONIX’s External Exposure Management Platform Detects and Validates
Zero-Days to Shrink MTTR

1

Map your entire attack surface (continously)

IONIX uses multi-factor discovery methods, including DNS analysis, certificate mapping, metadata inspection, and more, to automatically map every internet-facing asset across your environment. This includes cloud instances, third-party platforms, shadow IT, and even forgotten infrastructure that traditional tools miss.

2

Monitor for new CVEs

Dozens of threat intel feeds using agentic technology are continuously analyzed to detect the appearance of proof-of-concept code, exploit kits, and indicators of active targeting. IONIX goes further by applying AI to proactively evaluate whether emerging vulnerabilities are likely to be exploited, even before PoCs go public.

3

Identify Potential External Exposures

Not all CVEs matter. IONIX filters vulnerabilities by asking attacker-centric questions: Can it be reached from the internet? Does it require authentication? Is it being exploited in the wild? This dramatically reduces noise and focuses teams on threats that can actually be weaponized.

4

Create Safe, Scalable Exploit Validations

IONIX transforms real-world PoCs into safe, non-intrusive test payloads that can be run in production environments without disruption. These simulations are precisely targeted to the systems that are vulnerable, ensuring rapid validation without unnecessary load.

5

Execute Exploit Validations

By combining context about software stack, versioning, exposure status, and reachability, IONIX ensures that only the right payloads are executed against the right assets, maximizing efficiency and minimizing risk.

6

Drive Fast and Actionable Remediation

Results are routed through integrations with ticketing, SOAR, and SIEM tools. Issues are written in plain language, bundled into remediation clusters, and prioritized based on asset criticality, exploitability, and blast radius. This shortens mean time to remediation (MTTR) and empowers teams to act with confidence.

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

Subscribe to Threat Center RSS

Copy/paste the link below into your preferred RSS reader or follow these instructions to subscribe to Slack alerts.

Get Real-Time CVE Alerts to Your Email

Be the first to know when new zero-days emerge