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… (CVE-2026-67333)
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.
AI Analysis
Technical Summary
The vulnerability in better-auth before 1.6.13 and in pre-release builds 1.7.0-beta.0 through 1.7.0-beta.3 arises from failure to validate the scheme of redirect_uris registered via the deprecated oidc-provider plugin and the mcp plugin. An attacker can exploit this by registering an OAuth client with a redirect_uri using the javascript: scheme. When the authorization server returns this redirect_uri unchanged in the consent response, and if the consent page navigates the browser to this URI (e.g., by assigning it to window.location.href), the attacker's JavaScript executes in the context of the authorization server origin. This cross-site scripting (CWE-79) vulnerability can expose the victim's session and enable account takeover.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the authorization server's origin via a malicious redirect_uri. This can lead to exposure of user session information and potentially full account takeover. The vulnerability affects the confidentiality and integrity of user sessions but does not impact availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, deployments should avoid using the deprecated oidc-provider and mcp plugins or ensure that redirect_uri schemes are strictly validated and sanitized to prevent javascript: schemes. Additionally, consent pages should not directly navigate to untrusted redirect_uris without validation.
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… (CVE-2026-67333)
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.
CVSS v3.1
Score 7.2high
Affected software
pkg:github/better-auth/better-authRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in better-auth before 1.6.13 and in pre-release builds 1.7.0-beta.0 through 1.7.0-beta.3 arises from failure to validate the scheme of redirect_uris registered via the deprecated oidc-provider plugin and the mcp plugin. An attacker can exploit this by registering an OAuth client with a redirect_uri using the javascript: scheme. When the authorization server returns this redirect_uri unchanged in the consent response, and if the consent page navigates the browser to this URI (e.g., by assigning it to window.location.href), the attacker's JavaScript executes in the context of the authorization server origin. This cross-site scripting (CWE-79) vulnerability can expose the victim's session and enable account takeover.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the authorization server's origin via a malicious redirect_uri. This can lead to exposure of user session information and potentially full account takeover. The vulnerability affects the confidentiality and integrity of user sessions but does not impact availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, deployments should avoid using the deprecated oidc-provider and mcp plugins or ensure that redirect_uri schemes are strictly validated and sanitized to prevent javascript: schemes. Additionally, consent pages should not directly navigate to untrusted redirect_uris without validation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-w277-2xmj-j2rc
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-67333"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a6e6290bf32cb7a344f5e2c
Added to database: 08/01/2026, 21:18:08 UTC
Last enriched: 08/01/2026, 21:19:50 UTC
Last updated: 09/15/2026, 22:01:36 UTC
Views: 69
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.