Am I affected by Better Auth has stored XSS in the auth-server origin via javascript: redirect_uri in…? What should I do?
The deprecated
oidc-providerplugin registers OAuth clients without validating the scheme of theirredirect_uris.Affected: better-auth 1.6.12 and earlier, and 1.7.0-beta.0 to 1.7.0-beta.3. Fixed in: 1.6.13 (stable) and 1.7.0-beta.4 (pre-release). What should you check, and what should you do about it?
Full incident page with sources: https://agentarmorhq.com/incidents/2026/07/ghsa-86j7-9j95-vpqj-better-auth (opens external site)
1 answer
Am I affected? Affected: better-auth 1.6.12 and earlier, and 1.7.0-beta.0 to 1.7.0-beta.3. Fixed in: 1.6.13 (stable) and 1.7.0-beta.4 (pre-release).
- Check your version: run
npm ls better-auth. Versions < 1.6.13 of better-auth are affected.
What to do now
- Upgrade to the fixed version: run
npm install better-auth@1.6.13(first patched version 1.6.13). - Upgrade to
better-auth@1.6.13(stable) or1.7.0-beta.4(pre-release). - Before navigating, parse the returned value and navigate only when its scheme is
http:orhttps:. - Migrate to
@better-auth/oauth-provider. - Keep
allowDynamicClientRegistrationat its default offalseand restrict who can register clients.
General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.
Sources
- GitHub Advisory Database: https://github.com/advisories/GHSA-86j7-9j95-vpqj (opens external site)
Full incident page: https://agentarmorhq.com/incidents/2026/07/ghsa-86j7-9j95-vpqj-better-auth (opens external site)
Did this work for you?- Check your version: run