Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending (better-auth better-auth)

CVE-2026-45337
HIGH 7.6

At a glance

Source
NVD
EPSS
EPSS 0.21 % · percentile 12 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Analyzed

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.

Weaknesses (CWE)

  • CWE-285 — Improper Authorization
  • CWE-345 — Insufficient Verification of Data Authenticity

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 7.6CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:LGitHub_M
CVSS 3.1HIGH 7.6CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:LNVD · security-advisories@github.com (Secondary)

Advisories

European references

Affected configurations (NVD CPE)

Affected products

ProductVersions
better-auth · better-authaffected >= 1.6.0, < 1.6.11

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD