Skip to main content

better-auth/oauth-provider CVE-2026-67332

| EUVDEUVD-2026-51836 MEDIUM
Improper Authorization (CWE-285)
2026-08-01 VulnCheck GHSA-hq9c-fvm2-pfh9
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Register or compromise OAuth client
  2. Delivery
    Complete authorization code flow targeting Resource A
  3. Exploit
    Submit /oauth2/token request with resource=Resource B (allow-listed)
  4. Execution
    Receive signed JWT with aud=Resource B
  5. Persist
    Present token to Resource B server
  6. Impact
    Gain unauthorized access beyond original grant scope

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization verification
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following to hold simultaneously: (1) the target deployment runs @better-auth/oauth-provider on a stable 1.6.x release or any pre-release before 1.7.0-beta.4; (2) the server is configured with validAudiences containing more than one entry - a single-audience or default-URL-only configuration is explicitly not exploitable for cross-audience escalation; (3) at least one resource server in the allowlist enforces authorization based on the JWT aud claim; and (4) the attacker controls or compromises a registered OAuth client (PR:L - low privilege, but active client registration is required). Exploitation is further limited by the server's own allowlist: a resource not in validAudiences is rejected, so arbitrary resource escalation outside the configured set is not possible. Deployments where resource servers do not consume the aud claim for access control decisions are not practically exploitable even if the spec-compliance gap exists.

Impact

The CVSS 4.0 score of 5.3 reflects a network-reachable, low-complexity flaw requiring low-privilege access (PR:L), consistent with the OAuth client credential requirement. The impact metrics show limited confidentiality and integrity effects on both the vulnerable system and subsequent systems (VC:L/VI:L/SC:L/SI:L), which aligns with the constrained blast radius: exploitation is bounded by the server's validAudiences allowlist, and single-audience deployments are explicitly non-exploitable. No EPSS data was provided in the input, and the vulnerability is not listed in the CISA KEV catalog, indicating no confirmed widespread active exploitation. The vendor advisory explicitly scopes the vulnerability to deployments with more than one validAudiences entry whose resource servers consume the aud claim for authorization decisions - a non-default, opt-in configuration - which materially reduces the real-world risk population below what the CVSS vector alone suggests. The stable 1.6.x release line remains unpatched, meaning organizations on stable releases must apply workarounds rather than a routine upgrade. Overall this is a genuine authorization boundary violation with moderate priority for multi-audience OAuth deployments, but lower urgency for typical single-audience or non-aud-enforcing configurations.

Exploit ScenarioDerived

A malicious OAuth client registered with the authorization server completes a legitimate authorization code flow scoped to Resource Server A. At the token endpoint, the client then specifies resource=https://resource-server-b.example.com - a different server listed in validAudiences - and receives a signed JWT whose aud claim names Resource Server B, despite the authorization grant never covering it. The client presents this token to Resource Server B, which trusts the aud claim and grants access to data or operations the authorization never permitted. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 01, 2026

Audience-binding failure in @better-auth/oauth-provider (npm) allows authenticated OAuth clients to obtain JWT access tokens targeting resource servers never covered by the original authorization grant. Versions 1.4.8 through 1.7.0-beta.3 accept the RFC 8707 resource parameter exclusively at the token endpoint without recording it on the authorization code or the refresh-token row, meaning the authorized resource set is never enforced at redemption time. No public exploit has been identified at time of analysis, but the flaw directly undermines multi-audience OAuth deployments where resource servers enforce authorization based on the JWT aud claim.

RemediationAI

Vendor-released patch: 1.7.0-beta.4. Upgrade @better-auth/oauth-provider to version 1.7.0-beta.4 (and subsequently 1.7.0 when released) and run the required schema migration via 'npx auth migrate'. This is a breaking change: after the upgrade, a token or refresh request may only narrow the authorized resource set; requests for a resource not covered by the original grant return an invalid_target error, and the customAccessTokenClaims callback receives a resources array instead of a scalar resource field. Operators who cannot migrate to the 1.7.0 pre-release line and must remain on the stable 1.6.x branch should consult the workarounds described in GHSA-p2fr-6hmx-4528. Organizations with a single validAudiences entry (the default) are not vulnerable to cross-audience escalation but still have the spec-compliance gap; upgrading is recommended regardless. The full advisory is at https://github.com/better-auth/better-auth/security/advisories/GHSA-p2fr-6hmx-4528 and additional context is available at https://www.vulncheck.com/advisories/better-auth-oauth-provider-before-beta-4-authorization-bypass.

Affected VersionsENISA

oauth-provider 1.4.8 <1.7.0-beta.4

Affected Packages

npm @better-auth/oauth-provider fix: 1.7.0-beta.4
euvd oauth_provider fix: 1.7.0-beta.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected package (cpe:2.3:a:better-auth:oauth-provider:*:*:*:*:*:*:*:*) implements an OAuth 2.0 authorization server for Node.js applications. RFC 8707 (Resource Indicators for OAuth 2.0) allows clients to specify target resource servers using the resource parameter, which the provider is expected to bind to the authorization code and later enforce at the token endpoint. CWE-285 (Improper Authorization) captures the root cause: the server validates each requested resource only against its server-wide validAudiences allowlist but does not persist the authorized resource set on the authorization code or refresh-token row. Consequently, the authorization grant never carries the scoped resource binding, and any allow-listed resource can be requested at /oauth2/token regardless of what was authorized. The same gap applies to the refresh grant, allowing a refresh token tied to one audience to yield an access token for a different allow-listed audience.

Know when Better Auth gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.4 MEDIUM

PR:L reflects required OAuth client registration; S:C captures impact on resource servers outside the authorization server's trust boundary.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 01, 2026 - 13:01 EUVD

DescriptionCVE.org

@better-auth/oauth-provider before 1.7.0-beta.4 fails to bind access-token audience to the authorization grant, allowing clients to request tokens for unrelated resources. Attackers can complete an OAuth flow and obtain access tokens whose audience targets resource servers the authorization never covered, bypassing intended authorization boundaries.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Low
niche Node.js OAuth server library, limited production footprint
Social Media
5
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

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-67330 CRITICAL
9.4 Aug 01

Privilege-escalating account takeover in the @better-auth/scim plugin (versions 1.4.0-beta.27 through 1.6.21 and 1.7.0-b

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-2026-114607 CRITICAL
9.1 Oct 22

Unauthenticated OAuth state values can be redeemed as Magic Link tokens in Better Auth 1.4.0-beta.18 through 1.7.6, lett

CVE-2026-110864 CRITICAL
9.1 Oct 14

Authentication bypass in Better Auth's OAuth Proxy plugin (versions 1.5.0-beta.12 through 1.7.6) lets unauthenticated re

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-67331 HIGH
8.7 Aug 01

Authorization bypass in @better-auth/scim versions 1.5.0 through 1.7.0-beta.3 allows any authenticated user to fully tak

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-67328 HIGH
8.6 Aug 01

Multiple authentication bypass vulnerabilities in @better-auth/sso before version 1.6.21 enable low-privileged attackers

CVE-2026-80192 HIGH
8.6 Aug 25

Two domain-ownership authentication bypass flaws in @better-auth/sso allow authenticated organization owners to compromi

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