Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. CVE-2026-53518

CVE-2026-53518: @better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitive

July 7, 2026

The OAuth provider’s POST /oauth2/token endpoint, on the authorization_code grant, redeems a single-use authorization code through a non-atomic find-then-delete sequence. Two concurrent requests with the same code value both pass the read step before either delete completes, then both proceed to PKCE verification and createUserTokens. Each surviving request mints a fresh access token, refresh token, and id token. RFC 6749 §4.1.2 requires authorization codes to be single-use; this primitive does not enforce that under concurrency.

References

  • github.com/advisories/GHSA-7w99-5wm4-3g79
  • github.com/better-auth/better-auth/releases/tag/v1.6.11
  • github.com/better-auth/better-auth/security/advisories/GHSA-7w99-5wm4-3g79
  • nvd.nist.gov/vuln/detail/CVE-2026-53518

Code Behaviors & Features

Detect and mitigate CVE-2026-53518 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.11

Fixed versions

  • 1.6.11

Solution

Upgrade to version 1.6.11 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-294: Authentication Bypass by Capture-replay
  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Source file

npm/better-auth/CVE-2026-53518.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 13 Jul 2026 00:19:15 +0000.