Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109346 Overview
CVE-2026-109346 is a user interface misrepresentation vulnerability [CWE-451] in the better-auth authentication library, affecting the deviceAuthorization plugin. The flaw exists in versions 1.3.8-beta.3 through versions prior to 1.7.0-rc.3. The GET /device endpoint omits the requesting client_id and scope from the approval screen, preventing signed-in users from assessing what they are authorizing. Attackers initiate a device authorization request via /device/code, trick an authenticated victim into approving the user code, then redeem that code at /device/token to obtain a live session token.
Critical Impact
Successful exploitation grants an attacker a valid session token for the victim's account, enabling full account takeover without stealing credentials.
Affected Products
- better-auth version 1.3.8-beta.3
- better-auth versions after 1.3.8-beta.3 and before 1.7.0-rc.3
- Applications embedding the deviceAuthorization plugin from the affected range
Discovery Timeline
- 2026-10-12 - CVE-2026-109346 published to the National Vulnerability Database
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-109346
Vulnerability Analysis
The deviceAuthorization plugin implements the OAuth 2.0 Device Authorization Grant (RFC 8628). In a correctly implemented flow, the approval page must display the requesting client application and the scopes being requested so the user can make an informed authorization decision. The affected better-auth versions render the GET /device approval page without this context. As a result, the victim sees only the user code and an approval control.
An attacker exploits this gap by starting a device authorization request against the victim's tenant through POST /device/code, obtaining a legitimate user code. The attacker then phishes a signed-in user into visiting GET /device, entering the code, and clicking approve. Because no client identity or scope is shown, the user has no way to detect that the approval authorizes an attacker-controlled device session. Once the code is approved, the attacker calls POST /device/token and receives a session token tied to the victim's identity.
Root Cause
The root cause is incomplete rendering of authorization context in the device approval UI. The /device handler fails to resolve and present the client_id and scope associated with the pending device code, violating informed-consent expectations defined by RFC 8628 Section 3.3.
Attack Vector
Exploitation requires network access to the vulnerable application and user interaction from an authenticated victim. The attacker does not need credentials or prior privileges. The attack chain follows the device authorization grant steps: request a code, deliver the code to the victim through a phishing message, wait for approval, then poll the token endpoint for the issued session token.
See the GitHub Security Advisory GHSA-q84f-53jg-9ppm and the VulnCheck Advisory for Device Authorization Phishing for additional technical context.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-109346
Indicators of Compromise
- Requests to POST /device/code from source addresses not associated with legitimate device enrollment flows.
- Short time windows between GET /device approvals and successful POST /device/token redemptions originating from a different IP or user agent than the approving user.
- Issuance of session tokens where the approving user and the token-redeeming client exhibit mismatched geolocation or network autonomous system numbers (ASNs).
Detection Strategies
- Inventory applications that depend on better-auth and confirm whether the deviceAuthorization plugin is enabled.
- Instrument authentication logs to correlate device code issuance, approval, and token redemption as a single flow and alert on cross-identity divergence.
- Hunt for inbound phishing messages that reference device codes or point users at the application's /device path.
Monitoring Recommendations
- Forward better-auth request logs for /device/code, /device, and /device/token to centralized logging with user, client, IP, and user agent fields preserved.
- Alert on new session tokens issued through the device grant for privileged accounts.
- Track anomalous spikes in device code requests, which may indicate pre-attack reconnaissance.
How to Mitigate CVE-2026-109346
Immediate Actions Required
- Upgrade better-auth to version 1.7.0-rc.3 or later across all affected deployments.
- If the deviceAuthorization plugin is not required, disable it until the upgrade is applied.
- Invalidate active device-grant session tokens issued during the vulnerable period and require re-authentication for sensitive accounts.
Patch Information
The maintainers resolved the issue in better-auth1.7.0-rc.3. The fix ensures the GET /device approval view displays the requesting client_id and requested scope so users can make an informed authorization decision. Refer to the GitHub Security Advisory GHSA-q84f-53jg-9ppm for release details.
Workarounds
- Disable the deviceAuthorization plugin in the better-auth configuration until the patched version is deployed.
- Restrict the device authorization endpoints at the reverse proxy or web application firewall (WAF) to internal networks only.
- Educate users not to approve device codes received through unsolicited messages and require out-of-band confirmation for device enrollment.
# Example: pin better-auth to the fixed release
npm install better-auth@^1.7.0-rc.3
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

