CVE-2026-67333 better-auth before 1.6.13 Stored XSS via javascript redirect_uri
Stored XSS in better-auth allows attackers to execute JavaScript via malicious OAuth redirect URIs, leading to session theft and account takeover.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-67333?
CVE-2026-67333 is a medium-severity cross-site scripting vulnerability in better-auth, published on 1 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
better-auth before 1.6.13 (and pre-release builds 1.7.0-beta.0 through 1.7.0-beta.3) fail to validate the scheme of redirect_uris registered via the deprecated oidc-provider plugin and the mcp plugin (which wraps the same provider). An attacker can register an OAuth client with a javascript: redirect_uri, which the authorization server later returns unchanged in the consent response. If the deployment's consent page navigates the browser to the returned redirectURI (e.g. assigning it to window.location.href), the attacker's JavaScript executes in the authorization-server origin, exposing the victim's session and enabling account takeover.
Weakness: CWE-79
Which versions are affected by CVE-2026-67333?
4 open source packages ship an affected version, including better-auth.
| Package | Affected | Fixed in |
|---|---|---|
better-auth npm | All versions | 1.6.13 |
better-auth npm | All versions | 1.6.13 |
better-auth npm | From 1.7.0-beta.0 | 1.7.0-beta.4 |
better-auth npm | From 1.7.0-beta.0 | 1.7.0-beta.4 |
How do I fix CVE-2026-67333?
Upgrade better-auth to a fixed version for your release line: 1.6.13 or 1.7.0-beta.4.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-67333 being exploited?
There is no known exploitation of CVE-2026-67333 in the wild and no public exploit code.
Sources
Also known as GHSA-86j7-9j95-vpqj, GHSA-w277-2xmj-j2rc.