{"id":"CVE-2026-53518","published":"2026-07-15T17:17:06Z","modified":"2026-07-15T18:07:49Z","title":"Better Auth OAuth Provider: Race Condition in Authorization Code Exchange Enables Multi-Use Code Redemption","vendor":"better-auth","product":"better-auth","tier":"tail","description":{"text":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the @better-auth/oauth-provider POST /oauth2/token endpoint for the authorization_code grant redeems a single-use authorization code through a non-atomic find-then-delete sequence, allowing two concurrent requests to pass the read step and mint independent access tokens, refresh tokens, and ID tokens; legacy /oauth2/token and /mcp/token paths in oidc-provider and mcp plugins share the same primitive. This issue is fixed in version 1.6.11.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.6,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00409,"percentile":0.35962,"provenance":"source"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"},{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"references":[{"url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-7w99-5wm4-3g79","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/better-auth/better-auth/commit/b4bc65a007784b2eb0efb459e5fa6fd8055d3ec9","tags":["x_refsource_MISC"]},{"url":"https://github.com/better-auth/better-auth/releases/tag/v1.6.11","tags":["x_refsource_MISC"]}],"priority":{"score":12.5,"factors":[{"name":"EPSS percentile","points":7.19},{"name":"CVSS severity","points":5.32}]},"vendorSlug":"better-auth","affectedVersions":[{"vendor":"better-auth","product":"better-auth","versions":[">= 1.6.0, < 1.6.11"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-07-15T18:07:40.302581Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@better-auth/oauth-provider","vulnerableRanges":[">=1.6.0, <1.6.11"],"patched":["1.6.11"],"from":["GHSA-7w99-5wm4-3g79"],"provenance":"source"},{"ecosystem":"npm","package":"better-auth","vulnerableRanges":["<1.6.11"],"patched":["1.6.11"],"from":["GHSA-7w99-5wm4-3g79"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-44734","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-better-auth-cve-2026-53517","parents":[{"from":"CVE-2026-53517","to":"CVE-2026-53518","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/oauth-provider/src/token.ts"],"commits":["https://github.com/better-auth/better-auth/commit/c6918ecc9e3a75892169415d7f6c95b591b6a52d","https://github.com/better-auth/better-auth/commit/b4bc65a007784b2eb0efb459e5fa6fd8055d3ec9"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.45,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2026-41427","published":"2026-04-24","fixed":"1.6.5","kev":false,"link":{"from":"CVE-2026-41427","to":"CVE-2026-53518","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@better-auth/oauth-provider","fromFixed":"1.6.5","toFixed":"1.6.11","daysApart":82}]}},{"cve":"CVE-2026-53517","published":"2026-07-15","fixed":"1.6.11","kev":false},{"cve":"CVE-2026-53518","published":"2026-07-15","fixed":"1.6.11","kev":false}],"package":"npm:@better-auth/oauth-provider"}}