{"id":"GHSA-cq3f-vc6p-68fh","revision":null,"records":[{"revision":"b6acdefe23914afaa8b9a72ddc8ff655","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-45337","aliases":[],"title":"Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending","description":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim the row and POST /device/approve and POST /device/deny short-circuit when userId is unset, allowing an authenticated attacker who learns a valid user_code to bind the polling device to the attacker's account or deny the legitimate flow. This issue is fixed in version 1.6.11.","state":0,"publishedAt":"2026-07-15T17:31:44.983+00:00","modifiedAt":"2026-07-15T18:02:58.506+00:00","affected":[{"ecosystem":"Vendor product","name":"better-auth","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"better-auth\",\n                    \"product\": \"better-auth\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 1.6.0, < 1.6.11\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-cq3f-vc6p-68fh","https://github.com/better-auth/better-auth/pull/9573","https://github.com/better-auth/better-auth/commit/99a254a79b59d5a3f5ca2123260118cddb5beed7","https://github.com/better-auth/better-auth/releases/tag/v1.6.11"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-45337","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-45337","identifiers":["CVE-2026-45337"]},"retained":false,"historicalAffected":[]},{"revision":"37aa76382c0a42b7a708ea313eeb6b19","observedAt":"2026-11-22T12:28:39.472+00:00","statement":{"source":"euvd","id":"EUVD-2026-44743","aliases":["CVE-2026-45337","GHSA-cq3f-vc6p-68fh"],"title":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim t…","description":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim the row and POST /device/approve and POST /device/deny short-circuit when userId is unset, allowing an authenticated attacker who learns a valid user_code to bind the polling device to the attacker's account or deny the legitimate flow. This issue is fixed in version 1.6.11.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"severity":null}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-cq3f-vc6p-68fh","https://github.com/better-auth/better-auth/pull/9573","https://github.com/better-auth/better-auth/commit/99a254a79b59d5a3f5ca2123260118cddb5beed7","https://github.com/better-auth/better-auth/releases/tag/v1.6.11"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-44743","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 15, 2026, 5:31:44 PM","dateUpdated":"Jul 15, 2026, 6:02:58 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-44743","identifiers":["EUVD-2026-44743","CVE-2026-45337","GHSA-cq3f-vc6p-68fh"]},"retained":false,"historicalAffected":[]},{"revision":"131ab0e3e46b45eb80ded89111e69c24","observedAt":"2026-10-25T10:17:33.838+00:00","statement":{"source":"nvd","id":"CVE-2026-45337","aliases":[],"title":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim t…","description":"Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim the row and POST /device/approve and POST /device/deny short-circuit when userId is unset, allowing an authenticated attacker who learns a valid user_code to bind the polling device to the attacker's account or deny the legitimate flow. This issue is fixed in version 1.6.11.","state":0,"publishedAt":"2026-07-15T18:16:45.58+00:00","modifiedAt":"2026-07-21T04:21:25.23+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/commit/99a254a79b59d5a3f5ca2123260118cddb5beed7","https://github.com/better-auth/better-auth/pull/9573","https://github.com/better-auth/better-auth/releases/tag/v1.6.11","https://github.com/better-auth/better-auth/security/advisories/GHSA-cq3f-vc6p-68fh"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-45337","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-285","CWE-345"],"productCriteria":["cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2026-07-15T18:16:45.580","lastModified":"2026-07-21T04:21:25.230"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-45337","identifiers":["CVE-2026-45337"]},"retained":false,"historicalAffected":[]},{"revision":"04b6cd1f277342f1acf0644d99063e9b","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-cq3f-vc6p-68fh","aliases":["CVE-2026-45337"],"title":"Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending","description":"### Am I affected?\n\nYou are affected if all of the following are true:\n\n- You use `better-auth` at a version `>= 1.6.0, < 1.6.11`.\n- The `deviceAuthorization` plugin is enabled in your auth config (`deviceAuthorization()` in your `plugins` array).\n- A third party can observe a pending user code before the legitimate user completes verification.\n\nThe standard device-flow UX displays user codes to humans, so realistic exposure includes shoulder-surfing, screen-share, voice or video calls, support-chat transcripts, referrer headers, and shared logs.\n\nIf your application does not enable the `deviceAuthorization` plugin, you are not affected.\n\nFix:\n\n1. Upgrade to `better-auth@1.6.11` or later.\n2. If you cannot upgrade, see workarounds below.\n\n### Summary\n\nBetter Auth's `deviceAuthorization` plugin treated any authenticated session as the owner of any pending device code. The ownership gate on `POST /device/approve` and `POST /device/deny` short-circuited whenever the row's `userId` was unset, and the `GET /device` verification handler did not claim the row. An authenticated attacker who learned a valid `user_code` before the legitimate user completed approval could bind the polling device to the attacker's account or deny the legitimate flow.\n\n### Details\n\nThe device authorization flow binds the polling device to the user who entered the user code on the verification page. In affected versions, the plugin only created that binding at approve or deny time, with no claim at the verification step. The ownership check at approve and deny short-circuited when the owner was missing, accepting any authenticated caller instead of rejecting the request.\n\nThe fix changes `GET /device` to claim the pending row for the calling session. The approve and deny gates now require strict equality between the row's owner and the calling session. RFC 8628 §5.5 covers this risk class as Session Spying: a malicious party can hijack a session by completing authorization before the legitimate initiating user does.\n\n### Patches\n\nFixed in `better-auth@1.6.11`. After the patch, `GET /device` claims the pending row for the calling session, and `POST /device/approve` and `POST /device/deny` reject calls whose session does not match the claimed owner. Custom verification pages must serve `GET /device` to an authenticated session for the flow to succeed.\n\n### Workarounds\n\nIf you cannot upgrade immediately:\n\n- **Disable the plugin** if you do not use the device flow: remove `deviceAuthorization()` from your `plugins` array.\n- **Add a `before` hook** on `POST /device/approve` and `POST /device/deny` that tracks which session called `GET /device` for each user code, and rejects calls from a different session.\n- **Shorten the pending lifetime of device codes** via the `expiresIn` plugin option to reduce the exploitation window.\n\n### Impact\n\n- **Account takeover on the polling device**: the attacker's session becomes the device's session, so the device operates as the attacker.\n- **Denial of the legitimate sign-in**: the attacker can mark the code as denied, blocking the victim's flow.\n\n### Credit\n\nReported by Quikturn Security Team.\n\n### References\n\n- [CWE-285: Improper Authorization](https://cwe.mitre.org/data/definitions/285.html)\n- [CWE-863: Incorrect Authorization](https://cwe.mitre.org/data/definitions/863.html)\n- [CWE-639: Authorization Bypass Through User-Controlled Key](https://cwe.mitre.org/data/definitions/639.html)\n- [RFC 8628 §5.5: Session Spying](https://datatracker.ietf.org/doc/html/rfc8628#section-5.5)","state":0,"publishedAt":"2026-06-04T14:55:52+00:00","modifiedAt":"2026-06-09T12:15:08.3395325+00:00","affected":[{"ecosystem":"npm","name":"better-auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.6.0"},{"kind":"fixed","version":"1.6.11"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/better-auth/better-auth/security/advisories/GHSA-cq3f-vc6p-68fh","https://github.com/better-auth/better-auth/pull/9573","https://github.com/better-auth/better-auth","https://github.com/better-auth/better-auth/releases/tag/v1.6.11"],"sourceUrl":"https://github.com/advisories/GHSA-cq3f-vc6p-68fh","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-cq3f-vc6p-68fh","identifiers":["GHSA-cq3f-vc6p-68fh","CVE-2026-45337"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7050132+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7050135+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-2ae43d33679e7db56ab1b459a4a26f489723a98eec44cb48e7b9bc15fd8c4513","complete":true,"records":431119,"lastAttemptAt":"2026-11-24T12:25:34.0435863+00:00","lastSuccessAt":"2026-11-24T12:25:33.8929077+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.0435863+00:00","snapshotPublishedAt":"2026-11-24T11:31:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0041dd74f0f74a56936efb9a3230e9b6","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T12:35:26.4116826+00:00","lastSuccessAt":"2026-11-24T12:35:26.406+00:00","error":"326 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T12:35:26.406+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13515,"expectedIdentifiers":13982,"failedIdentifiers":326},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7058109+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7058137+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-af8ced7ee5fc4e4d8e650974b0ea48bf","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T12:26:14.9732632+00:00","lastSuccessAt":"2026-11-24T12:26:14.959+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:26:14.959+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13482,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T12:25:34.3950091+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.3950091+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T12:25:34.1932135+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.1932135+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T12:25:34.4958379+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.4958379+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T12:25:34.2909692+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.2909692+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}