Skip to main content

better-auth CVE-2026-67333

| EUVDEUVD-2026-51810 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-01 VulnCheck GHSA-w277-2xmj-j2rc
5.1
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
5.1 MEDIUM
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
5.4 MEDIUM

PR:L reflects default authenticated registration; S:C and C:L/I:L capture cross-origin session exposure via stored XSS; UI:R for required victim consent-page visit.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
P
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Aug 01, 2026 - 13:35 vuln.today
Analysis Generated
Aug 01, 2026 - 13:35 vuln.today
Patch available
Aug 01, 2026 - 13:01 EUVD

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on better-auth (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.7.0-beta.0.

DescriptionCVE.org

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.

AnalysisAI

Stored XSS in better-auth's deprecated oidc-provider and mcp plugins allows an attacker to register an OAuth client with a javascript: redirect_uri, which the authorization server stores and later returns unchanged in the consent response. If the deployment's consent page is a client-side component that assigns the returned redirectURI to window.location.href or equivalent, the attacker's JavaScript executes in the authorization-server origin - exposing the victim's session tokens and enabling account takeover. No public exploit or CISA KEV listing has been identified; the CVSS 4.0 score of 5.1 reflects required user interaction and limited subsequent-system impact, though deployments with unauthenticated dynamic client registration face elevated real-world risk.

Technical ContextAI

better-auth is a TypeScript/Node.js authentication library distributed via npm, providing drop-in OAuth 2.0 and OpenID Connect server capabilities. The vulnerability resides in the deprecated oidc-provider plugin and its wrapper mcp plugin (cpe:2.3:a:better-auth:better-auth:*:*:*:*:*:*:*:*), both of which implement client registration without validating the URI scheme of submitted redirect_uris. CWE-79 (Improper Neutralization of Input During Web Page Generation) is the root cause: untrusted attacker-controlled data is stored server-side and later reflected into a browser navigation context without sanitization. The javascript: URI scheme is a well-known XSS vector that browsers evaluate when assigned to location properties. The newer @better-auth/oauth-provider package, which is the migration target for both affected plugins, is not vulnerable. The defect is independent of any specific frontend framework - any consent page that performs client-side navigation using the returned URI value is susceptible.

RemediationAI

Vendor-released patches are available: upgrade to better-auth 1.6.13 on the stable line or 1.7.0-beta.4 on the pre-release line; both fix the missing URI scheme validation at client registration time. Advisory: https://github.com/better-auth/better-auth/security/advisories/GHSA-86j7-9j95-vpqj. If an immediate upgrade is not possible, three workarounds reduce or eliminate exposure: first, migrate from the deprecated oidc-provider or mcp plugin to @better-auth/oauth-provider, which does not carry this defect; second, modify the consent page to complete the OAuth flow using a server-side redirect (e.g., a Next.js or Remix server action) rather than assigning the redirectURI to window.location.href - browsers do not evaluate javascript: URIs delivered in HTTP Location headers; third, if allowDynamicClientRegistration is currently set to true, disabling it restricts client registration to authenticated users only, significantly limiting the attacker's ability to plant a malicious client without an existing account. Note that the second workaround requires a consent-page code change and must be verified against the specific framework in use.

CVE-2024-56734 HIGH POC
7.9 Dec 30

Better Auth is an authentication library for TypeScript. Rated high severity (CVSS 7.9), this vulnerability is remotely

CVE-2026-41427 HIGH POC
7.1 Apr 24

Authorization bypass in the @better-auth/oauth-provider plugin for Better Auth (versions >= 1.4.8-beta.7 and < 1.6.5, pl

CVE-2026-67336 CRITICAL
9.4 Aug 01

Authentication bypass in Better Auth before 1.6.11 stems from insecure cryptographic defaults in the legacy oidcProvider

CVE-2025-71401 CRITICAL
9.3 Aug 02

Denial of service in Better Auth (npm) before 1.4.2 lets an unauthenticated remote attacker poison the router's base pat

CVE-2025-71399 HIGH
8.8 Aug 02

Path normalization bypass in Better Auth before v1.4.5 allows unauthenticated remote attackers to circumvent `disabledPa

CVE-2026-67327 HIGH
8.7 Aug 01

Pre-account hijacking in better-auth (npm) allows a remote attacker to gain persistent, password-based access to any vic

CVE-2026-67337 HIGH
7.1 Aug 01

Two-factor authentication bypass in better-auth (npm) before version 1.4.9 allows network-accessible attackers holding v

CVE-2026-53515 HIGH
7.1 Jul 15

Privilege escalation in Better Auth SSO plugin (1.2.10 to <1.6.11) allows any authenticated organization member to regis

CVE-2025-71403 HIGH
7.1 Aug 01

Open redirect in the better-auth npm authentication library before version 1.1.21 enables one-click account takeover whe

CVE-2025-27143 MEDIUM
6.9 Feb 24

Better Auth is an authentication and authorization library for TypeScript. Rated medium severity (CVSS 6.9), this vulner

CVE-2026-67335 MEDIUM
6.0 Aug 01

OAuth state validation bypass in better-auth before 1.6.2 enables network-based attackers to forge the OAuth callback st

CVE-2025-71404 MEDIUM
5.1 Aug 01

Reflected XSS in better-auth's /api/auth/error endpoint enables arbitrary JavaScript execution in a victim's browser whe

Share

CVE-2026-67333 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy