All articles
Security updatesAwarely Monitor editorial team7 min

XSS2Shell: WordPress 7.0.3 fixes a pre-auth XSS on login

On 6 August 2026, WordPress shipped 7.0.3 for CVE-2026-64638, an unauthenticated XSS on the login page scored CVSS 8.9. Every version through 7.0.2 is affected, and the patch was backported as far as the 4.7 branch.

The part worth your attention is not only the bug, but where it came from: it was found by an autonomous system, not by a researcher reading the code.

What is affected, and what to do in the next few minutes

If you run a WordPress site, checking the version takes thirty seconds and is the only thing in this article that actually matters today.

  • ▸Affected: every WordPress version through 7.0.2
  • ▸Fixed in: 7.0.3, released 6 August 2026
  • ▸Backported: as far as the 4.7 branch
  • ▸Installations older than 4.7 remain affected and fall outside the backport range
  • ▸Automatic background updates should deliver the patch on their own — verify, do not assume

The bug: two parsers that disagree

When you try to log in with a username that does not exist, WordPress shows an error message containing the name you typed. That name first passes through sanitize_user() and wp_strip_all_tags(), which relies on PHP’s strip_tags().

The trick is a space. A string that looks like an HTML tag but carries a space immediately after the opening angle bracket is not recognised as a tag by strip_tags() — so it survives intact, as plain text.

Later, that same text reaches wp_kses_post(), which interprets it as permitted HTML. The result: live, attacker-controlled DOM elements on the login page.

This is a vulnerability class worth understanding beyond this one case. It is not "somebody forgot to sanitize". Both functions did their job. The problem is that they do not share an opinion about what counts as a tag. Anywhere two components parse the same input under slightly different rules, you have room for exactly this kind of bug.

From XSS to PHP execution

The login page loads user-profile.js, the script used for password resets. But the login page lacks the profile fields that script expects to find, so several checks compare against undefined — and pass.

This is where DOM clobbering comes in: the ajaxurl variable, undefined in this context, can be overwritten with the injected DOM elements. WordPress’s own JavaScript is thereby steered toward an attacker-chosen REST request on the same origin.

The final escalation uses Same Origin Method Execution, a 2022 technique from researcher Paulos Yibelo. The request runs with the administrator’s real session cookies and nonces. The researchers demonstrated several paths, including plugin installation and arbitrary ZIP uploads.

If PHP execution is reached, the consequences are the usual and complete set: database credentials, creation of a persistent administrator, content manipulation, and operating-system commands with the PHP worker’s privileges.

What exploitation actually requires

The two halves deserve separating, because their thresholds are very different.

The login-page XSS requires no authentication at all. It was demonstrated against fresh Chrome profiles with no WordPress cookies and no credentials. That is the cheap part.

The chain through to RCE requires the victim to be signed in as an Administrator and to interact explicitly with an attacker-controlled page — in the demonstrated path, one ordinary click. It does not, however, require unusual hosting or deployment settings: it works against default installations.

So this is not "the internet is on fire", but neither is it theoretical. It is precisely the profile of a targeted attack against an administrator, and one click on a link is a bar history has repeatedly shown to be low.

Who found it: an autonomous system, in four days

The vulnerability was discovered and responsibly disclosed by pwn.ai. Their autonomous system started from the 2022 SOME research as a seed and reproduced the chain in roughly four days, using open-source models and a multi-agent workflow.

That is the part that changes the calculation, rather than the bug itself. WordPress runs a large share of the web, and wp-login.php is among the most-read pieces of PHP code in the world. That a pre-auth XSS sat there until an automated system found it says something about what escapes human review.

The practical consequence for defenders: if finding vulnerabilities in mature code gets cheaper, the rate at which CVEs appear in the components you depend on goes up. The window between publication and exploitation does not widen to compensate.

What to do in practice

  • ▸Update to 7.0.3 now; if you rely on automatic updates, confirm they actually ran
  • ▸Do not treat hardening measures as a substitute — the project states explicitly they do not fully cover the underlying XSS
  • ▸Inventory where you have WordPress: the forgotten marketing or campaign instances are the ones that stay unpatched
  • ▸Treat administrator accounts as high-risk assets: short sessions, no general browsing from a fully privileged account
  • ▸Check logs for login attempts with usernames containing angle brackets
  • ▸If you run anything older than 4.7, you are outside the backport range — migration is no longer a next-quarter planning item

What is not confirmed

At the time of writing, the project’s advisory does not report in-the-wild exploitation. There is no complete public PoC: technical details were shared with the security press, and testing on clean deployments stopped at the XSS stage, with the full chain through to PHP execution demonstrated separately on a local installation.

The absence of observed exploitation is not a guarantee and not a reason to defer. For a patched vulnerability in a product this widespread, the distance between "not exploited yet" and "exploited at scale" has historically been days.

How to monitor CVEs and get alerts for products in your inventory