On 7 August 2026, researchers disclosed CVE-2026-64638, nicknamed XSS2Shell: a pre-authentication cross-site scripting flaw in WordPress Core, rated CVSS 8.9, which under specific conditions can be chained to PHP code execution on the server.
The reflected XSS itself needs nothing — no account, no user interaction beyond visiting the poisoned link. A single POST to /wp-login.php carrying a crafted "log" parameter delivers the payload through the failed-login error message. Given WordPress's footprint, the exposed population is enormous; estimates put it in the hundreds of millions of sites.
The bug is a disagreement between two parsers
This is worth understanding even if you never touch WordPress, because the failure class is everywhere. The username from a failed login passes through WordPress sanitisation that relies on PHP's strip_tags(). That function treats a "<" as the start of a tag only when it is followed by an alphanumeric character — so a payload written as "< area x=y>", with whitespace after the bracket, survives it as harmless text.
That surviving string then reaches wp_kses_post() when the login error is rendered — a code path added in WordPress 6.4. KSES uses a different parser, and that one reads "< area>" as a genuine HTML tag. Because <area> sits on the allowlist, it is permitted through and lands in the page.
Neither function is broken in isolation. The vulnerability lives in the gap between two components that each behave reasonably and interpret the same input differently. Any time input crosses a boundary between two parsers — sanitiser to renderer, proxy to application, gateway to backend — that gap is worth auditing. The official fix reflects this: it applies esc_html() at the point of interpolation in wp-includes/user.php, encoding the value before either sanitiser gets an opinion.
From XSS to shell — and the conditions that gate it
That distinction matters for triage, and deserves stating plainly: the pre-auth XSS affects everyone on the vulnerable range; the server takeover requires an administrator to be logged in and to interact. Do not downgrade the urgency on that basis — an admin session is an ordinary state of affairs on an actively managed site — but do prioritise accordingly if you are choosing between hundreds of instances.
- The injected DOM hijacks user-profile JavaScript that WordPress already loads on the login page for the password-reset flow
- Escalation uses Same Origin Method Execution (SOME), a technique that turns the site's own scripts against it
- The chain then steals an Application Password from a logged-in administrator's profile, uploads a plugin through hijacked REST endpoints, and executes PHP as the web-server user
- Full RCE requires a logged-in single-site administrator in the same browser, the password-reset flow enabled (the default), and further deployment conditions — meaningfully narrower than the XSS itself
Versions, and how to check quickly
Vulnerable: WordPress 6.4 through 7.0.2. Versions 6.3 and earlier are not exploitable through this path, because the login-error rendering did not yet use wp_kses_post(). Fixed: WordPress 7.0.3, with backports to supported branches as far as 4.7 as a precaution. Sites with automatic background updates should receive it without intervention — but "should" is not "did", so verify.
# Single site, with WP-CLI
wp core version
wp core update
# Without WP-CLI — read the version from the filesystem
grep -h '\$wp_version =' wp-includes/version.php
# Sweep a hosting directory of many sites
for d in /var/www/*/; do
printf "%-40s " "$d"
grep -h '\$wp_version =' "$d"wp-includes/version.php 2>/dev/null || echo 'no wordpress'
doneIf you cannot patch immediately
As of the disclosure there is no evidence of in-the-wild exploitation and no public proof-of-concept. That is a reason to move now rather than a reason to relax: the window between a public advisory and working exploit code keeps shrinking, as the TeamCity flaw we covered demonstrated when it reached CISA's KEV catalogue roughly eight days after the patch shipped.
- At the edge or WAF, block POST requests to /wp-login.php where the "log" parameter contains %3C, the URL-encoded "<". Per the researchers, do not narrow the rule to specific tag names — KSES accepts several whitespace characters and multiple allowlisted tags, so a name-based rule will be bypassed
- As a stopgap, disable Application Passwords or set DISALLOW_FILE_MODS to constrain the escalation path. Both are mitigations, not fixes — they narrow the chain without closing the XSS
- Move any instance still on a branch older than 4.7 to a supported branch. That is not a patching task, it is a migration, and it is overdue
- Add request-body logging on login and REST paths so you can build detection signatures and answer the question of whether anyone tried
The detail nobody should skim: who found it
The researchers report that their autonomous system discovered and reproduced the vulnerability chain after being pointed at Paulos Yibelo's 2022 research on Same Origin Method Execution as a starting point. The work took roughly four days, using open-source models in a multi-agent workflow.
Read alongside the disclosures we covered last week — Anthropic, the UK AI Security Institute, Meta — a picture emerges that is neither hype nor panic. Those incidents showed agents behaving unpredictably when containment failed. This one shows the same technology doing exactly what it was asked to do, competently, against a codebase used by a large share of the web.
The defensive implication is not that AI will find every bug. It is that the economics of discovery are shifting: subtle logic flaws that previously required a specialist's week of attention can now be surfaced by a workflow running in parallel across many targets. Defenders should assume the interval between "this bug exists" and "someone knows about it" is compressing, and plan patch cadence for that world rather than the previous one.
Awarely Monitor is built for that cadence: continuous tracking of NVD, CISA KEV, EUVD and GitHub Advisories matched against your own asset inventory, with CVSS + EPSS prioritisation, SLA tracking and an immutable audit trail — so a CVE affecting software you actually run reaches you as an alert rather than as a headline you happen to read.
Sources and verification
Open the original sources for context, updates and the exact wording of claims.