Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. GHSA-86j7-9j95-vpqj

GHSA-86j7-9j95-vpqj: Better Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcp

July 7, 2026

The deprecated oidc-provider plugin registers OAuth clients without validating the scheme of their redirect_uris. An attacker stores a javascript: URI as a client redirect target, and the authorization server later returns that URI to the browser in the consent response. A consent page that navigates to the returned value then executes attacker JavaScript in the authorization-server origin, which exposes the victim’s session and enables account takeover. The mcp plugin wraps the same provider and carries the same defect, so MCP server deployments are affected as well; like oidc-provider, it is migrating to @better-auth/oauth-provider.

References

  • github.com/advisories/GHSA-86j7-9j95-vpqj
  • github.com/better-auth/better-auth/releases/tag/v1.6.13
  • github.com/better-auth/better-auth/releases/tag/v1.7.0-beta.4
  • github.com/better-auth/better-auth/security/advisories/GHSA-86j7-9j95-vpqj

Code Behaviors & Features

Detect and mitigate GHSA-86j7-9j95-vpqj with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.13, all versions starting from 1.7.0-beta.0 before 1.7.0-beta.4

Fixed versions

  • 1.6.13
  • 1.7.0-beta.4

Solution

Upgrade to versions 1.6.13, 1.7.0-beta.4 or above.

Impact 7.7 HIGH

CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/better-auth/GHSA-86j7-9j95-vpqj.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Jul 2026 00:19:46 +0000.