WordPress 7.1.2 has been released to address a critical core vulnerability that could lead to remote code execution under certain server and theme configurations. This flaw, tracked as CVE-2026-87902 and GHSA-7hp8-65ch-5whp, has a CVSS v4 score of 9.2 and affects WordPress installations dating back to version 4.7. Critical WordPress Core Vulnerability By manipulating page-template handling, an attacker may cause WordPress to include a readable local PHP file located outside the active theme directory.

Successful exploitation could allow attackers to run arbitrary PHP code in the context of the affected web server, potentially leading to website takeover, data theft, persistent backdoors, malware deployment, or further movement across a hosting environment.

The project has also backported the patch to all currently security-supported branches through WordPress 4.7, enabling administrators to address the vulnerability without immediately upgrading to the latest major release. Patched versions include 7.0.6, 6.9.9, 6.8.10, 6.7.9, 6.6.9, 6.5.12, and corresponding updates for older maintained branches. Security teams should also review active themes for top-level page-* directories, identify exposed PHP files outside theme paths, and validate whether register_argc_argv is enabled.

Organizations using containerized PHP or shared-hosting control panels should prioritize exposure assessment, patch verification, and post-update log reviews for unusual requests targeting page-template parameters.