Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister or compromise OAuth client
-
DeliveryComplete authorization code flow targeting Resource A
-
ExploitSubmit /oauth2/token request with resource=Resource B (allow-listed)
-
ExecutionReceive signed JWT with aud=Resource B
-
PersistPresent token to Resource B server
-
ImpactGain 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
PR:L reflects required OAuth client registration; S:C captures impact on resource servers outside the authorization server's trust boundary.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
More in Better Auth
View allBetter Auth is an authentication library for TypeScript. Rated high severity (CVSS 7.9), this vulnerability is remotely
Authorization bypass in the @better-auth/oauth-provider plugin for Better Auth (versions >= 1.4.8-beta.7 and < 1.6.5, pl
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
Authentication bypass in Better Auth before 1.6.11 stems from insecure cryptographic defaults in the legacy oidcProvider
Denial of service in Better Auth (npm) before 1.4.2 lets an unauthenticated remote attacker poison the router's base pat
Unauthenticated OAuth state values can be redeemed as Magic Link tokens in Better Auth 1.4.0-beta.18 through 1.7.6, lett
Authentication bypass in Better Auth's OAuth Proxy plugin (versions 1.5.0-beta.12 through 1.7.6) lets unauthenticated re
Path normalization bypass in Better Auth before v1.4.5 allows unauthenticated remote attackers to circumvent `disabledPa
Authorization bypass in @better-auth/scim versions 1.5.0 through 1.7.0-beta.3 allows any authenticated user to fully tak
Pre-account hijacking in better-auth (npm) allows a remote attacker to gain persistent, password-based access to any vic
Multiple authentication bypass vulnerabilities in @better-auth/sso before version 1.6.21 enable low-privileged attackers
Two domain-ownership authentication bypass flaws in @better-auth/sso allow authenticated organization owners to compromi
EUVD-2026-51836
GHSA-hq9c-fvm2-pfh9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB