Time-of-check Time-of-use (TOCTOU) Race Condition Affecting @better-auth/oauth-provider package, versions >=1.6.0 <1.6.11


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (34th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-BETTERAUTHOAUTHPROVIDER-17889821
  • published8 Jul 2026
  • disclosed7 Jul 2026
  • creditDaniel Müller

Introduced: 7 Jul 2026

CVE-2026-53518  (opens in a new tab)
CWE-294  (opens in a new tab)
CWE-362  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade @better-auth/oauth-provider to version 1.6.11 or higher.

Overview

@better-auth/oauth-provider is an An oauth provider plugin for Better Auth

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition through a race condition in the authorization_code grant handler. An attacker can obtain multiple valid access, refresh, and ID tokens for the same authorization code by sending concurrent requests to the token endpoint before the authorization code is deleted, thereby bypassing single-use enforcement.

CVSS Base Scores

version 4.0
version 3.1