All vulnerabilities

npm

CVE-2026-109346

better-auth: Device login approval does not show the requesting client or permissions

Severity
High 8.1
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.7.0-rc.3
Exploit chance
0.3% in the next 30 daysHigher than 20% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-451
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Also known as
GHSA-q84f-53jg-9ppm
Sources
OSV.dev and GitHub

Description

The device authorization plugin lets a user sign in on one device by approving a short code on another. In affected versions, the approval information given to the user leaves out which client asked for access and which permissions it wants. The official approval examples therefore show only a generic request and a code, so users cannot tell their own device from an attacker's request.

An attacker who convinces a signed-in user to approve the attacker's code receives a live Better Auth session token for that user. The attacker can then read or change any data the user's account can access. The attack needs the opt-in device flow, a request the attacker creates, and a user who actively approves it; it is not a sign-in bypass without user action.

A device starts the flow by calling /device/code. The plugin stores the client identifier and any requested scope with the pending request. Before approval, GET /device returns only the user code and its status.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

If you cannot upgrade yet, do the following:

  • Disable deviceAuthorization(), or block untrusted access to /device/code.
  • Configure a strict validateClient allowlist. Do not rely on the allowlist alone: it limits who can start the flow, but it does not give users the missing approval information.
  • Build your own approval endpoint. It should read the pending request from trusted server-side storage and map the checked client identifier to a trusted display name. Show the exact requested permissions and the user code. Keep approval disabled until this information loads.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
better-authnpm · osv:npm:better-auth
  • From 1.3.8-beta.3 before 1.7.0-rc.3

About better-auth

Weekly downloads (npm)
21,121,233npm, 23 Nov 2026

References