WordPress XSS2Shell Flaw Enables Remote Code Execution via Login Page

A critical vulnerability chain in WordPress Core, identified as CVE-2026-64638 and dubbed XSS2Shell, has been discovered, allowing attackers to escalate a single failed login attempt into full remote code execution on the server. This flaw affects all WordPress versions since 4.7, potentially putting over 500 million websites at risk.

The exploit initiates on the standard login page, wp-login.php. When a non-existent username is entered, WordPress generates an error message using the wp_strip_all_tags function. Researchers at pwn.ai found that by inserting a space between the opening angle bracket and a tag name (e.g., “< area"), PHP's strip_tags parser interprets the string as harmless text, while WordPress's KSES sanitizer later processes it as legitimate HTML elements. This discrepancy allows attackers to inject elements like ,

, and