Better Auth OAuth Provider: Refresh Token Rotation Race Condition Allows Concurrent Replay and Token Family Forking (better-auth better-auth)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.42 % · percentile 37 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
Description
Better Auth is an authentication and authorization library for TypeScript. From 1.4.8-beta.7 until 1.6.11, the @better-auth/oauth-provider POST /oauth2/token endpoint on the refresh_token grant performs a non-atomic read, validate, revoke, and mint sequence on the oauthRefreshToken row, allowing concurrent requests with the same parent refresh token to pass the revoked check and create forked refresh-token families; the vulnerable range also includes embedded better-auth plugin versions before 1.6.0. This issue is fixed in version 1.6.11.
Weaknesses (CWE)
- CWE-362 — Concurrent Execution using Shared Resource with Improper Synchronization
- CWE-367 — Time-of-check Time-of-use (TOCTOU) Race Condition
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | GitHub_M |
| CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-392p-2q2v-4372 — Better Auth: OAuth refresh-token rotation forks the token family on concurrent redemption
European references
- ENISA EUVD · EUVD-2026-44745
- GCVE · GCVE-0-2026-53517
Affected configurations (NVD CPE)
cpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:node.js:*:*≥ 1.6.0 < 1.6.11cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:*≥ 1.4.9 < 1.6.11cpe:2.3:a:better-auth:better_auth:1.4.8:-:*:*:*:node.js:*:*cpe:2.3:a:better-auth:better_auth:1.4.8:beta7:*:*:*:node.js:*:*
Affected products
| Product | Versions |
|---|---|
| better-auth · better-auth | affected >= 1.4.8-beta.7, < 1.6.0 |
| @better-auth · oauth-provider | affected >= 1.6.0, < 1.6.11 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |