WordPress CVE Critical Path Traversal Enables RCE
WordPress has released version 7.1.2 to patch a critical path traversal vulnerability in core. The flaw, tracked as CVE-2026-87902 with a CVSS score of 9.2, allows an unauthenticated attacker to include a readable PHP file from outside the active theme directories. Under certain server conditions, this becomes remote code execution on the target site. Every version from 4.7.0 through 7.1.1 is affected.
What Happened: WordPress Patches Critical Path Traversal in Template Resolution
On September 22, 2026, WordPress shipped version 7.1.2 to fix a single critical flaw. The release arrived only five days after 7.1.1, which itself contained eleven security fixes. WordPress assigned the new issue CVE-2026-87902 and rates it critical severity with a CVSS score of 9.2.
The vulnerability was responsibly disclosed by researcher Robert Ressl. No public proof-of-concept has been confirmed, and there are no signs of active exploitation in the wild. However, the attack requires no account and no action from a logged-in user. Consequently, any unpatched site is exposed.
Technical Details of the CVE-2026-87902 Path Traversal Flaw
The flaw sits in the get_page_template() function, which decides which template file to load for a page. WordPress builds candidate filenames from parts of the request path, and in affected versions it failed to sanitize directory traversal sequences (../) in one of those values. An attacker can craft a request that points the template loader at a readable PHP file outside the active theme directories.
However, turning file inclusion into arbitrary code execution requires additional conditions. The server must already contain a PHP file that does something useful when loaded. This is the reason WordPress says the flaw enables RCE on “some servers” rather than all. Affected themes also matter: the active theme needs a top-level directory whose name starts with page-.
Attack Prerequisites
- WordPress version 4.7.0 through 7.1.1
- Active theme with a top-level directory name starting with
page- - A readable PHP file on the server that can be weaponized when included
- Typical targets include
pearcmd.phpwhenregister_argc_argvis enabled
Affected Themes Reported So Far
- Twenty Twelve
- Twenty Fourteen
- Neve
- Hestia
- Sydney
Business and Operational Impact
WordPress powers over 43 percent of the web. A critical core flaw that requires no authentication is a major risk to the global web ecosystem. The impact varies by site, but the worst case is full site compromise.
- Website defacement: Attackers can replace site content or redirect visitors
- Data theft: Site databases, user records, and configuration files are exposed
- Malware distribution: Compromised sites can serve malware or phishing pages to visitors
- SEO and reputation damage: Search engines may blacklist affected domains
- Compliance exposure: Breached sites handling personal data may trigger GDPR or CCPA obligations
Sites running on the official PHP Docker image or older cPanel configurations with PHP versions before 8.5 are reported to be at elevated risk.
Mitigation and Recommendations
WordPress has patched the flaw in version 7.1.2. The core team also backported the fix to every supported branch back to 4.7. There is no separate workaround, so updating is the only fix.
Immediate Actions for Defenders
- Update to WordPress 7.1.2 immediately. Visit Dashboard > Updates and click “Update Now,” or download the release from WordPress.org.
- Enable automatic background updates if they are not already active. Sites with this feature enabled will patch automatically.
- Review your active theme for a top-level directory starting with
page-. If present, treat the site as higher risk and prioritize patching. - Audit server configurations for the presence of
pearcmd.phpand theregister_argc_argvsetting. - Check access logs for unusual requests targeting page template paths or containing traversal sequences.
Patched Version Reference
- 7.1.x branch: update to 7.1.2
- 7.0.x branch: update to 7.0.6
- 6.9.x branch: update to 6.9.9
- 6.8.x branch: update to 6.8.10
- 6.7.x branch: update to 6.7.9
- 6.6.x branch: update to 6.6.9
Bottom line: CVE-2026-87902 is a critical, unauthenticated WordPress core flaw. Every site running 7.1.1 or earlier should update to 7.1.2 now. The attack conditions are narrow, but the consequence is full remote code execution. Patch immediately.
Incident Summary
| CVE ID / Incident: | CVE-2026-87902 / GHSA-7hp8-65ch-5whp |
| Affected Systems: | WordPress 4.7.0 through 7.1.1 |
| Severity: | Critical (CVSS 9.2) |
| Disclosure Date: | September 22, 2026 |
| Patch Status: | Fixed in WordPress 7.1.2; backports in progress |
| Exploitation Status: | No confirmed exploitation in the wild |
| Reporter: | Robert Ressl |
References
- WordPress.org, “WordPress 7.1.2 Release,” September 22, 2026, https://wordpress.org/news/2026/09/wordpress-7-1-2-release/.
- The Hacker News, “WordPress Issues Patch for Critical Flaw That Can Enable Code Execution on Some Servers,” September 22, 2026, https://thehackernews.com/2026/09/wordpress-issues-patch-for-critical.html.
- GitHub Advisory, “GHSA-7hp8-65ch-5whp,” WordPress/wordpress-develop, https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp.
- SecurityOnline.info, “CVE-2026-87902: Critical WordPress RCE Flaw Fixed in Version 7.1.2,” September 22, 2026, https://securityonline.info/wordpress-rce-vulnerability-cve-2026-87902/.
- WP Care, “Fifth Core Security Release Since July — WordPress 7.1.2,” September 22, 2026, https://wpcare.ie/wordpress-7-1-2-security-release/.