Skip to main content
CVE-2026-53518VulnerabilityPublished Updated

@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race

Affects @better-auth/oauth-providerSource GCVE Database

0
Compare

Not known to be exploited · CVSS 8.1 High : upgrade to 1.6.11 soon.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
npm@better-auth/oauth-providerAffected
  • >=1.6.0 <1.6.11
Fixed in
  • 1.6.11
npmbetter-authAffected
  • <1.6.11
Fixed in
  • 1.6.11

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

Community reviews

Loading reviews…