Intel

AIKIDO-2026-19281

@better-auth/electron is vulnerable to Information Disclosure

GHSA-9p5w-h4pr-fcrcPublished Nov 4, 2026
November 4, 2026

81

CVE Score

High

Information Disclosure

Are you affected? Scan for Free

TL;DR

The Electron plugin accepts any validly signed cookie under its desktop transfer cookie name, because the signature does not cover the cookie name. When no valid transfer request is found, its after hook returns the whole endpoint context as the sign-in response, leaking the auth secret and social provider client secrets to any user who can sign in. With the auth secret, an attacker can forge signed values and obtain a session as another user whose email they know. Separately, when electron() is registered before twoFactor(), a desktop authorization code is created right after the password check and before the second factor is verified. That code can be exchanged for a full session, bypassing two-factor authentication.

How do I fix this?

Upgrade the @better-auth/electron library to the patch version, and upgrade better-auth to 1.7.16. If the plugin has been running, treat the auth secret and every social provider client secret as disclosed and rotate them.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your server registers the electron() plugin. The two-factor bypass additionally requires twoFactor() to be registered after electron() in the plugins array, with users who have two-factor enabled able to sign in with a password.

Versions

1.5.0 - 1.7.15

Fixed in 1.7.16

Background info

@better-auth/electron is vulnerable to Information Disclosure in versions 1.5.0 - 1.7.15.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea