WordPress Core <= 7.1.1 - Unauthenticated Local File Inclusion via locate_template() Path Traversal
CISA confirms exploitation of this vulnerability in real attacks. Prioritise checking whether your application is affected. CISA KEV · CC0 1.0
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| WordPress (core) | WordPress | >= 4.7, <= 4.7.36, >= 4.8, <= 4.8.31, >= 4.9, <= 4.9.32, >= 5.0, <= 5.0.28, >= 5.1, <= 5.1.25, >= 5.2, <= 5.2.27, >= 5.3, <= 5.3.24, >= 5.4, <= 5.4.22, >= 5.5, <= 5.5.21, >= 5.6, <= 5.6.20, >= 5.7, <= 5.7.18, >= 5.8, <= 5.8.16, >= 5.9, <= 5.9.17, >= 6.0, <= 6.0.15, >= 6.1, <= 6.1.13, >= 6.2, <= 6.2.12, >= 6.3, <= 6.3.11, >= 6.4, <= 6.4.11, >= 6.5, <= 6.5.11, >= 6.6, <= 6.6.8, >= 6.7, <= 6.7.8, >= 6.8, <= 6.8.9, >= 6.9, <= 6.9.8, >= 7.0, <= 7.0.5, >= 7.1, <= 7.1.1 | 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 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-98- Platform
- WordPress
- Package
WordPress- Disclosed
- 22.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
Wordfence Intelligence - 6ff76d9b-aa12-4391-90cd-f9df36d4a3a5 - Wordfence Intelligence
Copyright 1999-2026 The MITRE Corporation
Copyright 2012-2026 Defiant Inc.
This record contains material that is subject to copyright
Copyright 1999-2026 The MITRE Corporation
CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE®). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.
https://www.cve.org/Legal/TermsOfUseCopyright 2012-2026 Defiant Inc.
Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.
https://www.wordfence.com/wordfence-intelligence-terms-and-conditions/Wordfence Intelligence
Wordfence Intelligence - Defiant, Inc. Copyright Defiant, Inc. All rights reserved except as granted below. License grant, section 3.1 of the Wordfence Intelligence Terms and Conditions (January 26, 2026): Subject to this Agreement, Company hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the Service. Any copy you make for such purposes is authorized provided that you reproduce Company’s copyright designation, this license, and the license of any disclosed Company licensor in any such copy. Full applicable Agreement: https://www.wordfence.com/wordfence-intelligence-terms-and-conditions/
Vulnerability history: WordPress
All published vulnerabilities of this package (WordPress (core)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 385
- First → latest
- 06.2003 10.2026
- Without a fix
- 0
- Exploited in attacks
- 3
Severity breakdown
- Critical 16
- High 95
- Medium 263
- Low 11
Disclosures per year
- 2017: 39
- 2018: 15
- 2019: 22
- 2020: 23
- 2021: 5
- 2022: 20
- 2023: 14
- 2024: 4
- 2025: 2
- 2026: 36
earlier: 205
-
WordPress Core <= 7.1.1 - Unauthenticated Local File Inclusion via locate_template() Path Traversal this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.