highCVSS 8.1Vulnerability

CVE-2026-53517

### Am I affected? Users are affected if all of the following are true: - Their project depends on `@better-auth/oauth-provider` at a version `>= 1.6.0, < 1.6.11`, or uses the embedded plugin in `better-auth >= 1.4.8-beta.7, < 1.6.0`. - At least one OAuth client served by their application's authorization server requests the `offline_access` scope, so refresh tokens are minted. - Concurrent redemption of the same refresh token is reachable: an SPA shares one refresh token across browser tabs without a mutex, a mobile client retries after a transient failure, an attacker who has stolen a refresh token times two requests, or a service worker queues offline requests. If developer applications do not request `offline_access` for any client, no refresh tokens are minted and they are not exposed. Fix: 1. Upgrade to `@better-auth/[email protected]` or later. 2. If developers cannot upgrade, see workarounds below. ### Summary The OAuth provider's `POST /oauth2/token` endpoint, on the `refresh_token` grant, performs a non-atomic read / validate / revoke / mint sequence on the `oauthRefreshToken` row. Two concurrent requests presenting the same parent refresh token both pass the revocation check before either revoke completes, so each mints a fresh refresh token. The replay-detection branch only fires when `revoked` is already truthy at read time, which is exactly the state concurrent attackers race past. The result is a forked refresh-token family from a single parent token. ### Details The `adapter.update` predicate on the parent row is keyed on `id` only; it does not include `revoked IS NULL`, so two concurrent updates both succeed (last-write-wins, no error path). The schema does not declare `unique` on `oauthRefreshToken.token`, so concurrent creates do not collide on a unique-key violation either. RFC 9700 §4.14 (OAuth Security Best Current Practice) prescribes refresh-token family invalidation on detected reuse; this implementation tries to enforce that c

Properties

summary
Better Auth: OAuth refresh-token rotation forks the token family on concurrent redemption
severity
high
epss_score
0.0024
cvss_score
8.1
ghsa_published
2026-07-07T20:55:48Z
source_url
https://github.com/advisories/GHSA-392p-2q2v-4372
ghsa_updated
2026-07-07T20:55:49Z
ghsa_id
GHSA-392p-2q2v-4372
cve_id
CVE-2026-53517
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
is_ghsa_only
false
epss_percentile
0.15466

Related Entities (10)

ENRICHED_BY (1)

[Source]FIRST EPSS

HAS_WEAKNESS (4)

[Weakness]Insufficient Session Expiration
[Weakness]Time-of-check Time-of-use (TOCTOU) Race Condition
[Weakness]Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
[Weakness]Authentication Bypass by Capture-replay

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (2)

[Software]npm/@better-auth/oauth-provider
[Software]npm/better-auth

AFFECTS (2)

[Software]npm/better-auth
[Software]npm/@better-auth/oauth-provider

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-53517 (CVSS 8.1) — Ninja Signal Threat Intelligence | Ninja Signal