@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race
Affects @better-auth/oauth-providerSource GCVE Database
Not known to be exploited · CVSS 8.1 High : upgrade to 1.6.11 soon.
Data as of 30 Oct 2026, 06:59 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 35% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.6.11
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 7 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade @better-auth/oauth-provider and better-auth to 1.6.11.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npm@better-auth/oauth-provider | Affected
| Fixed in
|
| npmbetter-auth | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
An official fix is available by upgrading to @better-auth/oauth-provider version 1.6.11 or later. For legacy plugin users, upgrade better-auth to version 1.6.11 or later. No workaround fully closes the vulnerability without applying the patch. Temporary mitigations include deploying a reverse proxy that serializes token requests by authorization code, adding database uniqueness constraints on token issuance (if feasible), or implementing custom adapter hooks to detect duplicate claims; however, these are fragile and not recommended as sole solutions. Upgrading remains the only reliable remediation.
Description
A race condition in @better-auth/oauth-provider versions >=1.6.0 and <1.6.11 allows concurrent redemption of the same OAuth authorization code. This occurs because the token endpoint uses a non-atomic find-then-delete operation to consume single-use authorization codes, enabling multiple token sets to be issued from one code. The issue also affects legacy plugins in better-auth versions >=1.4.8-beta.7 and <1.6.0. The vulnerability violates RFC 6749's single-use code requirement and can lead to multiple valid tokens from a single authorization code.
References
- github.com/better-auth/better-auth/security/advisories/GHSA-7w99-5wm4-3g79 (opens in a new tab)
- github.com/better-auth/better-auth (opens in a new tab)
- github.com/better-auth/better-auth/releases/tag/v1.6.11 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-53518 (opens in a new tab)
- github.com/better-auth/better-auth/commit/b4bc65a007784b2eb0efb459e5fa6fd8055d3ec9 (opens in a new tab)