Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain any valid signed-in account
-
DeliverySubmit normal desktop sign-in request
-
ExploitAfter-hook returns full endpoint context
-
ExecutionRead leaked auth secret and client secrets
-
PersistForge signed value with auth secret
-
ImpactImpersonate another user's session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Outbound data filtering
|
| Exploitation Conditions | Exploitation requires the server to register the electron() plugin from @better-auth/electron (>=1.5.0-beta.12 and below the fixed versions); without this plugin the secret-disclosure path does not exist. The secret-disclosure path then requires only a validly authenticated sign-in (PR:L), so any user who can sign in can trigger it against default plugin configuration, and session forgery additionally requires knowing the victim's email address. The two-factor-bypass path has stricter prerequisites: the server must also register twoFactor(), electron() must appear BEFORE twoFactor() in the plugins array, two-factor users must be able to sign in with a password, and the attacker must already know the target's password. Limiting factors: an attacker needs a valid account (or known credentials) rather than pure unauthenticated access, and the 2FA path is blocked by ordering twoFactor() before electron() on recent better-auth releases - though that ordering does not fix the secret-disclosure problem. Note that upgrading does not undo a prior disclosure: the vendor states any already-exposed auth secret and social-provider client secrets must be rotated. |
| Impact | This is a genuine priority within its (narrow) deployment footprint, not a high-CVSS-but-low-real-risk issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H) describes a network-reachable, low-complexity flaw requiring only low privileges (PR:L = any authenticated user who can sign in), with high confidentiality and integrity impact - consistent with the description: a normal authenticated sign-in can return the server's internal auth context, disclosing the auth secret and social-provider client secrets, which then enables forging sessions as arbitrary users (CWE-201 feeding CWE-288). The vuln.today decision label is 'this_week' (not act_now/emergency), and it was reported by VulnCheck and discovered by Anthropic's OSS Scanner. No EPSS score is provided in the input, and there is no CISA KEV listing and no PoC reference - exploitation status is 'no public exploit identified at time of analysis'. Signals are internally consistent: the authenticated-but-low-barrier vector plus secret disclosure plus 2FA-bypass path justify prompt (this-week) remediation, while the absence of KEV/EPSS/PoC indicates no confirmed active or widespread exploitation yet. Note the mechanism is unusually low-effort post-authentication: any legitimate account holder - not a privileged admin - can retrieve the secrets, so the PR:L barrier is weak wherever self-registration or shared sign-in is allowed. |
| Exploit ScenarioDerived | An attacker who can obtain any valid account on a server running the @better-auth/electron plugin signs in normally; because the plugin's after-hook returns the whole endpoint context when no valid transfer request is found, the response leaks the auth secret and social-provider client secrets. Using the auth secret, the attacker mints signed values the server trusts and takes over the session of any other user whose email they know, with no victim interaction. Separately, an attacker who already knows a target's password can exchange a desktop authorization code issued before two-factor verification to bypass the second factor. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 21, 2026
The @better-auth/electron desktop sign-in plugin returns the server's full endpoint auth context - including the Better Auth secret and the client secrets of every configured social provider - in ordinary sign-in responses, giving any authenticated user the material needed to forge sessions for other users whose email address they know. Separately, when twoFactor() is registered after electron() in the plugins array, a password sign-in can mint a desktop authorization code before the second factor is checked, letting an attacker who already holds a user's password complete desktop sign-in without the second factor. Affected are @better-auth/electron 1.5.0-beta.12 through 1.7.15 and 1.8.0-beta.0 through 1.8.0-beta.4; the vendor issued fixes in 1.7.16 and 1.8.0-beta.5. No public exploit code identified at time of analysis, and the vendor notes that upgrading does not undo a disclosure that already occurred - the auth secret and social provider client secrets must be treated as compromised and rotated.
RemediationAI
Vendor-released patch: upgrade @better-auth/electron and better-auth to 1.7.16, or to 1.8.0-beta.5 if you track the beta line, per advisory GHSA-9p5w-h4pr-fcrc. Because the flaw leaked long-lived secrets rather than just a session, upgrading alone is not sufficient: the vendor states that if the plugin has been running, the auth secret and every configured social provider client secret must be treated as disclosed and rotated, since the upgrade does not undo a disclosure that already happened. If you cannot patch immediately, remove the electron() plugin from your server until you upgrade - this fully closes both paths but disables desktop sign-in for your users. Reordering the plugins array so twoFactor() appears before electron() blocks the confirmed two-factor bypass on recent better-auth releases, at the cost of no functionality loss beyond the ordering change, but it does not fix the server-secret disclosure, so it is only a partial mitigation and must not be relied on alone. Review previous sign-in responses and logs for exposed context objects as part of the incident review, and see https://www.vulncheck.com/advisories/better-auth-electron-before-1.7.16-auth-secret-disclosure-and-two-factor-bypass for the vendor-sourced summary.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Better Auth is a TypeScript authentication framework, and @better-auth/electron is an npm plugin that hands a desktop (Electron) client a session after browser sign-in. After sign-in the plugin reads a signed transfer cookie to start the desktop handoff, but it accepted any value carrying a valid signature rather than a value bound to that specific cookie name; because Better Auth signatures cover only the cookie value and not its name, another cookie legitimately signed during the same sign-in could be resent under the transfer cookie name. When no valid transfer request was subsequently found, the plugin's after hook returned the entire endpoint context instead of the normal response, and that context was serialized into the response body - a classic CWE-201 insertion of sensitive information into sent data, exposing the auth secret and social provider client secrets. The second issue is CWE-288 (authentication bypass using an alternate path): the plugin stored the desktop authorization code while the temporary password session still existed, so a code was issued before the elective second factor was verified; desktop authorization codes are now bound to the browser session that issued them and stop working when that session ends, regardless of plugin order. Affected builds are the npm package @better-auth/electron from 1.5.0-beta.12 up to (excluding) 1.7.16, and 1.8.0-beta.0 up to (excluding) 1.8.0-beta.5, with the paired better-auth core package fixed at the same versions. The vulnerable paths were reported by Anthropic's OSS Scanner as ANT-2026-R8Z0P3MG and ANT-2026-DDHILQ2X, the latter covering a related anonymous sign-in route.
Know when Electron gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Network-reachable and low-complexity; PR:L because any authenticated sign-in triggers the leak; high C (secret disclosure) and high I (forged sessions/2FA bypass); no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
@better-auth/electron 1.5.0-beta.12 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 accepts any validly signed value as its transfer cookie and returns the full endpoint context, including the auth secret and social provider client secrets, in sign-in responses. Authenticated users can obtain these secrets to forge sessions as other users. Attackers knowing a password can exchange desktop authorization codes issued before two-factor verification to bypass the second factor.
Technical POC Analysis
Two defects in @better-auth/electron, the desktop sign-in plugin for Better Auth.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The @better-auth/electron desktop sign-in plugin, used across versions 1.5.0-beta.12 through 1.7.15 and 1.8.0-beta.0 through 1.8.0-beta.4, exposes the Better Auth server secret and all configured social provider client secrets in ordinary sign-in responses, enabling any authenticated user to forge sessions for others whose email they know. A secondary flaw allows second-factor bypass under certain plugin ordering, undermining MFA protections. Leadership should care because any authenticated user can escalate to impersonating other users and potentially the broader application trust boundary; secrets already disclosed cannot be remediated by patching alone and must be rotated.
No vendor-released patch identified at time of analysis; however the vendor issued fixes in 1.7.16 and 1.8.0-beta.5. Interim mitigations: treat the Better Auth secret and all social provider client secrets as compromised and rotate them immediately, ensure twoFactor() is registered before electron() in the plugins array to prevent second-factor bypass, restrict access to affected sign-in endpoints, and monitor authentication logs for forged sessions or second-factor-skipping password sign-ins.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
GitHub Electron versions 1.8.2-beta.3 and earlier, 1.7.10 and earlier, 1.6.15 and earlier has a vulnerability in the pro
Remote code execution in 5ire 0.15.2 and earlier arises because the desktop AI assistant renders Mermaid diagrams with s
Cross-site scripting in DeepChat's Mermaid diagram renderer escalates to full remote code execution on affected desktop
Remote code execution in DeepChat 0.5.1 and below is possible through a cross-site scripting flaw in Mermaid diagram ren
Stored cross-site scripting in SiYuan through 3.8.4 lets an attacker who can set a notebook name containing an HTML payl
GitHub Electron before 1.6.8 allows remote command execution because of a nodeIntegration bypass vulnerability. Rated hi
GitHub Electron 1.7.15, 1.8.7, 2.0.7, and 3.0.0-beta.6, in certain scenarios involving IFRAME elements and "nativeWindow
Electron version 1.7 up to 1.7.12; 1.8 up to 1.8.3 and 2.0.0 up to 2.0.0-beta.3 contains an improper handling of values
electron-updater allows for automatic updates for Electron apps. Rated high severity (CVSS 7.5), this vulnerability is r
Cross-origin read bypass in Electron's custom protocol handler exposes sensitive application data to remote pages via fe
Native code execution outside the Chromium sandbox is achievable in Electron prior to 39.8.9, 40.9.2, 41.2.1, and 42.0.0
In Electron before versions 7.2.4, 8.2.4, and 9.0.0-beta21, there is a context isolation bypass. Rated critical severity
EUVD-2026-132254
GHSA-7rc3-jqv7-7gw2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB