Insertion of Sensitive Information Into Sent Data Affecting @better-auth/electron package, versions >=1.5.0-beta.12 <1.7.16>=1.8.0-beta.0 <1.8.0-beta.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.31% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-BETTERAUTHELECTRON-23050810
  • published30 Nov 2026
  • disclosed21 Nov 2026
  • creditoctane-security-team, Shubham Antil, Anthropic's OSS Scanner

Introduced: 21 Nov 2026

NewCVE-2026-134316  (opens in a new tab)
CWE-201  (opens in a new tab)

How to fix?

Upgrade @better-auth/electron to version 1.7.16, 1.8.0-beta.5 or higher.

Overview

@better-auth/electron is a Better Auth integration for Electron applications.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data via the electron() plugin's after-hook, which returns the full endpoint context - including the auth secret and social provider client secrets - in sign-in responses when no valid transfer request is found. The plugin accepts any validly signed value as its transfer cookie because signature verification covers only the cookie value and not its name, allowing another signed cookie issued during sign-in to be submitted under the transfer cookie name. Any authenticated user can obtain the auth secret and use it to forge sessions as arbitrary users whose email address they know. Additionally, the plugin stores a desktop authorization code before two-factor verification completes, allowing an attacker who knows a user's password to exchange that code for a full session without satisfying the second factor.

Note: The two-factor bypass requires the server to register twoFactor(), for electron() to appear before twoFactor() in the plugins array, and for users with two-factor enabled to be able to sign in with a password.

References

CVSS Base Scores

version 4.0
version 3.1