# CVE-2026-45337: Better Auth authorization bypass in deviceAuthorization plugin

Source: https://junglewise.ai/threats/cve-2026-45337-better-auth-authorization-bypass-in-deviceauthorization-plugin  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-15. Updated: 2026-07-15  
License: CC BY 4.0 with a link back

CVE-2026-45337 · Severity: high · CVSS 7.6 · Published 2026-07-15

Better Auth is a security library used by developers to handle user logins and permissions in TypeScript applications. A flaw in its device authorization feature allows a logged-in attacker to hijack another user's login process if they can obtain a temporary device code (e.g., through screen sharing or shoulder surfing). This could result in the attacker gaining control over the session on the victim's device or preventing the legitimate user from logging in.

Technologies: [better-auth (npm)](https://junglewise.ai/threats/technologies/better-auth). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-45337 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45337 being exploited in the wild.

**How severe is CVE-2026-45337?** High severity, with a CVSS score of 7.6, published 15 July 2026.

**Which products and versions are affected?** better-auth (npm) >= 1.6.0, < 1.6.11, SEMVER:introduced=1.6.0,fixed=1.6.11.

**Is there a fix for CVE-2026-45337?** Yes. better-auth (npm): upgrade to 1.6.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45337 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45337?** Check whether you run better-auth (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- better-auth (npm): upgrade to 1.6.11 or later

  ```sh
  npm install better-auth@1.6.11
  ```


## Technical details

An authorization bypass exists in the Better Auth deviceAuthorization plugin due to improper ownership validation. The 'GET /device' endpoint fails to claim the pending device code row for the authenticated session, and the 'POST /device/approve' and 'POST /device/deny' endpoints short-circuit their ownership checks when the 'userId' field is NULL. An authenticated attacker who obtains a valid 'user_code' can exploit this to bind their own account to the victim's polling device. The vulnerability is fixed in version 1.6.11 by ensuring 'GET /device' claims the row and enforcing strict session-to-owner equality in subsequent requests.

## Affected products

- better-auth better-auth >= 1.6.0, < 1.6.11

## Identifiers

- CVE-2026-45337
- GHSA-cq3f-vc6p-68fh

## Timeline

- 2026-05-12: patched: Fix merged in PR #9573 and released in v1.6.11
- 2026-05-31: advisory: GitHub Security Advisory GHSA-cq3f-vc6p-68fh published
- 2026-07-15: disclosed: CVE-2026-45337 published to NVD

## References

- [https://github.com/better-auth/better-auth/commit/99a254a79b59d5a3f5ca2123260118cddb5beed7](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/pull/9573)
- [https://github.com/better-auth/better-auth/releases/tag/v1.6.11](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](https://github.com/better-auth/better-auth/security/advisories/GHSA-cq3f-vc6p-68fh)

## Related threats

- [Better Auth authentication bypass in Magic Link and OAuth](https://junglewise.ai/threats/cve-2026-114607-better-auth-is-an-authentication-and-authorization-library-for)
- [Better Auth OAuth Proxy authentication bypass](https://junglewise.ai/threats/cve-2026-110864-better-auth-from-1-5-0-beta-12-before-1-7-7-contains-an)
- [Better Auth authentication bypass via OAuth state reuse](https://junglewise.ai/threats/cve-2026-110862-better-auth-from-1-4-0-beta-18-before-1-7-7-contains-an)
- [@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL](https://junglewise.ai/threats/cve-2026-110861-better-auth-better-auth-drizzle-adapter-and-better-auth-from-1-6)
- [better-auth device authorization UI misrepresentation in deviceAuthorization plugin](https://junglewise.ai/threats/cve-2026-109346-better-auth-from-1-3-8-beta-3-before-1-7-0-rc-3-contains-a-ui)
