WordPress Local File Inclusion to Remote Code Execution Vulnerability (CVE-2026-87902)

A critical vulnerability, identified as CVE-2026-87902, has been discovered in WordPress Core. The vulnerability is caused by improper validation during page-template resolution and could allow an unauthenticated remote attacker to include a readable local PHP file located outside the active WordPress theme directories. Under certain server and theme configurations, successful exploitation could lead to remote code execution and complete compromise of the affected website.

WordPress has released security updates to address the vulnerabilities. System owners are strongly recommended to verify their installed WordPress version and update to the latest version immediately.

 

Vulnerability

  • WordPress Local File Inclusion to Remote Code Execution Vulnerability (CVE-2026-87902)

Severity Level

  • Critical

Affected Versions

  • WordPress Core versions prior to 7.1.2
  • WordPress backported the fix to every older branch it still supports as a courtesy, down to 4.7.37.

Remediation

  • Update WordPress Core immediately:
    • Upgrade affected installations to WordPress 7.1.2 or later.
    • For installations remaining on an older maintained branch, apply the corresponding security release provided by WordPress.
  • Verify automatic updates:
    • System owners should verify the currently installed version instead of assuming that the update has been completed successfully.
  • Review web server and security logs for suspicious requests containing page_id, pagename, or double-encoded path traversal sequences.
  • Check for unauthorized accounts, modified files, unknown plugins or themes, web shells, and other indicators of compromise.

 

Reference

 

 

 

 

Published on: 23 September 2026