Radar sectionsDatabase
Check my site
WordPress wordpress core

WordPress Core <= 7.1.1 — Unauthenticated Local File Inclusion via locate_template() Path Traversal

CVE-2026-87902Published · Updated

Action summary

Affected: ≤7.1.1Update to 4.7.37 or 4.8.32 or 4.9.33 or 5.0.29 or 5.1.26 or 5.2.28 or 5.3.25 or 5.4.23 or 5.5.22 or 5.6.21 or 5.7.19 or 5.8.17 or 5.9.18 or 6.0.16 or 6.1.14 or 6.2.13 or 6.3.12 or 6.4.12 or 6.5.12 or 6.6.9 or 6.7.9 or 6.8.10 or 6.9.9 or 7.0.6 or 7.1.2 or newer

Fixed versions are per release branch: update to the fix for the branch you run.

All remediation steps
Public PoC
High8.1CVSS 3.18.1EPSS95.8%CISA KEVListedAccessNo account needed

Overview

Advisory ID
CVE-2026-87902
Product
WordPress wordpress
Affected
≤7.1.1
Fixed in
4.7.37, 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
Required access
No account needed
Published
· updated
Credit
Robert Ressl
  1. Affected≤ 7.1.1
  2. Patched in4.7.37 / 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

Update to 4.7.37 / 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 or newer.

8.1
CVSS 3.1 · CNA (Wordfence)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
What does this vector mean?
AV:N Attack vector
Network
AC:H Attack complexity
High
PR:N Privileges required
None
UI:N User interaction
None
S:U Scope
Unchanged
C:H Confidentiality
High
I:H Integrity
High
A:H Availability
High

WordPress Core is vulnerable to Local File Inclusion via the locate_template() function in various versions up to, and including, 7.1.1. The function resolved a caller-supplied template name against the theme directories without verifying the result stayed within them, so a template name containing '..' could resolve to a readable PHP file outside the active theme and be included. The core-reachable vector is get_page_template(), which builds page-{$pagename}.php from the URL-derived, url-decoded 'pagename' query variable. This makes it possible for unauthenticated attackers to make page-template resolution include a chosen readable local .php file outside the theme directories, which under certain conditions can lead to remote code execution. Exploitation requires (1) the active parent or child theme to contain a top-level directory whose name begins with 'page-' (e.g. 'page-templates' in Twenty Twelve, Twenty Fourteen, Neve, Hestia, Sydney), and (2) a readable .php target on the server accessible to the web-server account (e.g. pearcmd.php with register_argc_argv=On, as in the official PHP Docker image and default cPanel setups on PHP < 8.5), which yields RCE.

Not sure which version you run? Run a passive check — it reads public files only.

Remediation & mitigations

  1. Update to one of the following versions, or a newer patched version: 4.7.37, 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
  2. Because this CVE is listed in CISA KEV, review the site for signs of compromise: unknown administrator accounts, new PHP files under wp-content/uploads, and unexpected redirects.
  3. Rotate administrator passwords and application secrets if the site ran a vulnerable version while publicly reachable.

References & provenance

Proof-of-concept & detection

This CVE is listed in CISA KEV. VulnCrest does not publish proof-of-concept code for KEV-listed vulnerabilities.

  • UnreviewedGitHubabraxas/CVE-2026-87902
  • UnreviewedGitHubvulpecuna/CVE-2026-87902
  • UnreviewedGitHubressl/cve-2026-87902-poc
  • UnreviewedGitHubpwnVader/CVE-2026-87902-PoC-pwnVader
  • UnreviewedGitHubrabakuku/CVE-2026-87902-A-working-PoC-for-WordPress-s-critical-path-traversal
  • UnreviewedGitHubdinosn/cve-2026-87902-wordpress-lfi-lab
  • UnreviewedGitHubzer0dayf/CVE-2026-87902
  • UnreviewedGitHubHassham1/CVE-2026-87902
  • UnreviewedGitHubynsmroztas/WPSniper
  • UnreviewedGitHubbhideki/CVE-2026-87902
  • UnreviewedGitHubtc4dy/CVE-2026-87902-Toolkit
  • UnreviewedGitHubnextco/wordpress-cve-2026-87902
  • UnreviewedGitHubzyphorixofficialmain-lab/cve-2026-87902
  • UnreviewedGitHubcrowsec-edtech/CVE-2026-87902
  • UnreviewedGitHubjoaovicdev/EXPLOIT-CVE-2026-87902
  • UnreviewedGitHubSVTagan/WP-CVE-2026-87902
  • UnreviewedGitHubitskill-jp/wordpress-upgrade-check
  • UnreviewedGitHubrwxrwxs/CVE-2026-87902
  • UnreviewedGitHublangz337/CVE-2026-87902
  • UnreviewedGitHubabatsakidis/wp-cve-2026-87902-checker
  • UnreviewedGitHubMaalfer/CVE-2026-87902-exploit
  • UnreviewedGitHubHackfutSecRoot/CVE-2026-87902
  • UnreviewedGitHubtonydelouvre/CVE-2026-87902
  • UnreviewedGitHubxiaxiu555/cve-2026-87902

Third-party code, not reviewed by VulnCrest. Fake PoC repositories regularly contain malware. Read the code before running anything, and only run it against a lab you own.

Advisories & patches

Related CVEs

Other Local File Inclusion vulnerabilities
SeverityVulnerabilityCVEPublished
Medium6.4Authenticated (Contributor+) DOM-Based Stored Cross-Site Scripting via 'data-text-sec', 'data-title', and 'title' Attributes via Custom HTML Block
Flatsome≤3.20.12Update to 3.20.13
CVE-2026-18742
High7.1Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment RenameCVE-2026-124969
Critical9.8Missing Authorization to Unauthenticated Arbitrary User Password Reset / Account Takeover via Webhook with 'Is the user ID' Field
AutomatorWP Webhooks≤1.4.4Update to 1.4.5
CVE-2026-126173
High7.2Unauthenticated Stored Cross-Site Scripting via Comment User-Agent HeaderCVE-2026-120688

Timeline

  1. CVE published

    Severity high, CVSS 8.1

  2. Record last updated

Sources & licenses

Wordfence record
Vulnerability data
Wordfence Intelligence. Copyright 2012-2026 Defiant Inc. Licensed under the CC BY-SA 4.0.
CVE® identifiers
Copyright 1999-2026 The MITRE Corporation. Used under the CVE Program. CVE® is a registered trademark of The MITRE Corporation.
CVSS / CWE
National Vulnerability Database (NVD), shown unmodified. This product uses the NVD API but is not endorsed or certified by the NVD.
KEV status
CISA Known Exploited Vulnerabilities catalog (CC0 1.0).
EPSS
Exploit Prediction Scoring System by FIRST.org.
VulnCrest content
Summary, remediation guidance and page layout © VulnCrest. Not sourced from NVD.

How we use these sources

Search VulnCrest Radar

Are you sure?