GHSA-7w99-5wm4-3g79: @better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitive
- Identifiers
- CVE-2026-53518GHSA-7w99-5wm4-3g79
- Published
- Record updated
- Affected
- better-auth < 1.6.11
- @better-auth/oauth-provider >= 1.6.0, < 1.6.11
- Fixed in
- 1.6.11
- better-auth 1.6.11 released May 12, 2026, 56 days before disclosure
- @better-auth/oauth-provider 1.6.11 released May 12, 2026, 56 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.4%
Summary
GHSA-7w99-5wm4-3g79 affects @better-auth/oauth-provider at versions >= 1.6.0 and < 1.6.11, the embedded plugin in better-auth >= 1.4.8-beta.7 and < 1.6.0, and the legacy oidc-provider and mcp plugins. The POST /oauth2/token authorization_code grant redeems single-use codes through a non-atomic find-then-delete sequence, so two concurrent requests with the same code can both pass verification and each mint access, refresh and id tokens, contrary to RFC 6749 section 4.1.2.
Mitigation
Fixed in @better-auth/oauth-provider@1.6.11 and better-auth@1.6.11 for the legacy oidc-provider and mcp plugin paths, which switch to an atomic internalAdapter.consumeVerificationValue claim. Upgrade is the recommended path; the source says the listed workarounds (reverse-proxy serialization, database uniqueness constraints, application-layer hooks) do not fully close the bug without a code patch.
Related items
- MediumCVE-2026-138033: mcp-video-analyzer server-side request forgery via video URL inputsSimilar attack · NVD/CVE Database
- MediumSwitzerland Confirms AI-Assisted Cyberattacks Breached Critical Infrastructure OperatorsSimilar attack · The Hacker News
- MediumCVE-2026-137668: ONNX ONNXMLTools cross site scripting in visualize_model via producer_nameSimilar attack · NVD/CVE Database
- MediumCVE-2026-137667: ONNX ONNXMLTools cross site scripting in Model VisualizationSimilar attack · NVD/CVE Database
- InfoEvaluating transformer based language model robustness under low rate training data poisoningSimilar attack · OpenAlex (peer-reviewed AI security)