CVE-2026-67332
@better-auth/oauth-provider before 1.7.0-beta.4 Authorization Bypass
@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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
@better-auth/oauth-provider before 1.7.0-beta.4 Authorization Bypass
@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.
- Record
CVE-2026-67332- CVSS 4.0
- 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 - CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
EUVDEUVD-2026-51836
5.3
@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.
- Record
EUVD-2026-51836- CVSS 4.0
- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-hq9c-fvm2-pfh9
5.3
@better-auth/oauth-provider before 1.7.0-beta.4 fails to bind access-token audience to the...
@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.
- Record
GHSA-hq9c-fvm2-pfh9- CVSS 4.0
- 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/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 - CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-p2fr-6hmx-4528
6.4
@better-auth/oauth-provider may provide access tokens for unauthorized audiences via unbound resource indicators
Am I affected?
Users are affected if all of the following hold:
- Their application depends on
@better-auth/oauth-provideron any stable1.6.xrelease (the stable line is not patched) or on a pre-release before1.7.0-beta.4. - Their application either configures validAudiences
with more than one audience, or it issues JWT access tokens whoseaud` (resource) claim is consumed by their resource servers. - Their resource servers make authorization decisions based on that
audor resource value.
A deployment with a single validAudiences entry (or the default, their server's base URL) cannot mint a token for a different audience. The provider rejects any resource outside the allowlist. Such a deployment still does not bind the resource to the authorization grant, so the spec-compliance gap remains even where cross-audience escalation does not apply.
Fix:
- Upgrade to
@better-auth/[email protected](then1.7.0), then run the schema migration (npx auth migrate). This is a breaking change: a token or refresh request may only narrow the authorizedresource, an uncovered resource returnsinvalid_target, andcustomAccessTokenClaimsreceives aresourcesarray in place ofresource. - The
1.6.xstable line is not patched. If an application stays on it, developers should apply the workarounds below.
Summary
@better-auth/oauth-provider lets an OAuth client choose the access-token audience through the RFC 8707 resource parameter at the token endpoint. It does not bind that choice to the authorization grant. A client that completes a normal authorization flow can request a JWT access token whose audience targets a resource server the authorization never covered. The only constraint is that the resource appears in the server's validAudiences allowlist. The same gap applies to the refresh grant: a refresh token issued in a flow targeting one resource can be redeemed for an access token bound to a different allow-listed resource.
Details
The provider accepts resource only at the token endpoint, never at the authorization endpoint. At /oauth2/token it validates each requested resource against the server-wide validAudiences allowlist and writes the result into the JWT aud claim. It does not record the requested resources on the authorization code, and it does not store them on the refresh-token row.
Two consequences follow. For the authorization-code grant, the resource a client states at /oauth2/authorize is discarded, and the resource it sends at /oauth2/token is honored on its own, checked only against the allowlist. For the refresh grant, the audience is re-derived from the refresh request body alone, because no resource from the original grant is retained to constrain it. In both cases the audience becomes a per-request, client-chosen value rather than a property of the authorization.
This diverges from RFC 8707. The specification expects the authorization server to record the resources requested at authorization, then let the token endpoint narrow them but never widen them. A refresh token should stay bound to the resources of the original grant.
Patches
Fixed in @better-auth/[email protected] (then 1.7.0). The fix records the requested resources at authorization, stores them with the authorization code, enforces subset narrowing at the token endpoint, retains the original resource set across refresh, and exposes aud at introspection. The 1.6.x stable line is not patched.
The fix is a breaking change. It replaces customAccessTokenClaims.resource with a resources array, returns invalid_target for a resource the authorization did not cover, and adds a schema field that requires a migration. After upgrading, run npx auth migrate (or npx auth generate if developers manage the schema themselves).
Workarounds
If developers cannot upgrade their applications:
- Set
validAudiencesto a single audience, or leave it unset so…
- Record
GHSA-p2fr-6hmx-4528- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-285, CWE-863
- Updated
- 2026-11-02
NVD
5.3
@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.
- Record
CVE-2026-67332- CVSS 4.0
- 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/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 - CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
OSV
5.3
@better-auth/oauth-provider before 1.7.0-beta.4 Authorization Bypass
@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.
- Record
CVE-2026-67332- CVSS 4.0
- 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 - Weakness
- CWE-285
- Updated
- 2026-11-02
OSVGHSA-p2fr-6hmx-4528
6.4
@better-auth/oauth-provider may provide access tokens for unauthorized audiences via unbound resource indicators
Am I affected?
Users are affected if all of the following hold:
- Their application depends on
@better-auth/oauth-provideron any stable1.6.xrelease (the stable line is not patched) or on a pre-release before1.7.0-beta.4. - Their application either configures validAudiences
with more than one audience, or it issues JWT access tokens whoseaud` (resource) claim is consumed by their resource servers. - Their resource servers make authorization decisions based on that
audor resource value.
A deployment with a single validAudiences entry (or the default, their server's base URL) cannot mint a token for a different audience. The provider rejects any resource outside the allowlist. Such a deployment still does not bind the resource to the authorization grant, so the spec-compliance gap remains even where cross-audience escalation does not apply.
Fix:
- Upgrade to
@better-auth/[email protected](then1.7.0), then run the schema migration (npx auth migrate). This is a breaking change: a token or refresh request may only narrow the authorizedresource, an uncovered resource returnsinvalid_target, andcustomAccessTokenClaimsreceives aresourcesarray in place ofresource. - The
1.6.xstable line is not patched. If an application stays on it, developers should apply the workarounds below.
Summary
@better-auth/oauth-provider lets an OAuth client choose the access-token audience through the RFC 8707 resource parameter at the token endpoint. It does not bind that choice to the authorization grant. A client that completes a normal authorization flow can request a JWT access token whose audience targets a resource server the authorization never covered. The only constraint is that the resource appears in the server's validAudiences allowlist. The same gap applies to the refresh grant: a refresh token issued in a flow targeting one resource can be redeemed for an access token bound to a different allow-listed resource.
Details
The provider accepts resource only at the token endpoint, never at the authorization endpoint. At /oauth2/token it validates each requested resource against the server-wide validAudiences allowlist and writes the result into the JWT aud claim. It does not record the requested resources on the authorization code, and it does not store them on the refresh-token row.
Two consequences follow. For the authorization-code grant, the resource a client states at /oauth2/authorize is discarded, and the resource it sends at /oauth2/token is honored on its own, checked only against the allowlist. For the refresh grant, the audience is re-derived from the refresh request body alone, because no resource from the original grant is retained to constrain it. In both cases the audience becomes a per-request, client-chosen value rather than a property of the authorization.
This diverges from RFC 8707. The specification expects the authorization server to record the resources requested at authorization, then let the token endpoint narrow them but never widen them. A refresh token should stay bound to the resources of the original grant.
Patches
Fixed in @better-auth/[email protected] (then 1.7.0). The fix records the requested resources at authorization, stores them with the authorization code, enforces subset narrowing at the token endpoint, retains the original resource set across refresh, and exposes aud at introspection. The 1.6.x stable line is not patched.
The fix is a breaking change. It replaces customAccessTokenClaims.resource with a resources array, returns invalid_target for a resource the authorization did not cover, and adds a schema field that requires a migration. After upgrading, run npx auth migrate (or npx auth generate if developers manage the schema themselves).
Workarounds
If developers cannot upgrade their applications:
- Set
validAudiencesto a single audience, or leave it unset so…
- Record
GHSA-p2fr-6hmx-4528- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-285, CWE-863
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@better-auth/oauth-providernpm |
1.4.8 up to 1.7.0-beta.4 | 1.7.0-beta.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-67332 is a medium vulnerability (CVSS 5.3) in Better-auth Oauth-provider, published July 7, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.26%, the 17th percentile. Fixed in @better-auth/oauth-provider 1.7.0-beta.4.
References
github.com/better-auth/better-auth/security/advisories/GHSA-p2fr-6hmx-4528
vulncheck.com/advisories/better-auth-oauth-provider-before-beta-4-authorization-bypass
nvd.nist.gov/vuln/detail/CVE-2026-67332
github.com/advisories/GHSA-hq9c-fvm2-pfh9
github.com/better-auth/better-auth/releases/tag/v1.7.0-beta.4
github.com/advisories/GHSA-p2fr-6hmx-4528
github.com/CVEProject/cvelistV5/tree/main/cves/2026/67xxx/CVE-2026-67332.json
github.com/better-auth/better-auth
Left out here: the rest of 2 source descriptions. The JSON record has them.