Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessWait for server startup/restart
-
DeliverySend first request with forged X-Forwarded-Host/Proto
-
ExploitgetBaseURL derives poisoned basePath
-
ExecutionRouter caches corrupted base path
-
PersistAll auth routes return 404 for all users
-
ImpactRepeat after each restart for persistent DoS
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that Better Auth's baseURL is NOT explicitly configured AND the BETTER_AUTH_URL environment variable is unset, so the library falls back to deriving its base path from the client-supplied X-Forwarded-Host and X-Forwarded-Proto headers. The malicious request must be the very first request the server processes after startup/restart, because the poisoned value is cached until restart - this timing requirement is the main limiter. Exploitation is further prevented on typical managed hosting platforms and in any environment where baseURL is set, where the vulnerable fallback is never reached. No authentication or user interaction is needed (PR:N/UI:N). |
| Impact | The provided CVSS 4.0 vector (9.3 Critical, VC:H/VI:H/VA:H) overstates real impact: the described consequence is purely availability (all routes return 404), not confidentiality or integrity loss, so the H ratings for VC and VI are inconsistent with the description and should be treated as inflated - the realistic impact is availability-only DoS. Exploitation is unauthenticated and network-reachable (PR:N/UI:N), which raises priority, but two strong limiting factors reduce practical risk: it only works when baseURL/BETTER_AUTH_URL is left unset, and the malicious request must be the FIRST request the server processes after startup, which is a timing/race condition. The advisory explicitly notes the fallback is unreachable in properly configured environments and on typical managed hosting platforms. No EPSS score was supplied and there is no KEV listing; a public reproduction exists but there is no evidence of active exploitation. Net: a real, easy-to-exploit availability bug for the narrow population running unconfigured baseURL, not a widespread critical-impact issue despite the 9.3 score - verify the CVSS discrepancy with the vendor. |
| Exploit ScenarioDerived | Immediately after a Better Auth service (deployed without baseURL/BETTER_AUTH_URL) restarts, an attacker races to send the first HTTP request to /api/auth/ok with headers 'X-Forwarded-Proto: some:' and 'X-Forwarded-Host: junk'. This poisons the cached basePath so all auth endpoints return 404 for every user until the next restart; the attacker can repeat the request after each restart for persistent denial of service. A working proof-of-concept curl sequence is published in the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 02, 2026
Denial of service in Better Auth (npm) before 1.4.2 lets an unauthenticated remote attacker poison the router's base path when baseURL is not explicitly configured. By sending the very first request after server startup with crafted X-Forwarded-Host and X-Forwarded-Proto headers, the attacker forces every subsequent auth route to return 404 for all users until restart. A working reproduction (curl commands) is published in the GHSA advisory, so publicly available exploit code exists; there is no CISA KEV listing and no public exploit identified as being used in active attacks.
RemediationAI
Vendor-released patch: 1.4.2 - upgrade the better-auth npm dependency to 1.4.2 or later, which is the primary and complete fix (see GHSA-569q-mpph-wgww). If immediate upgrade is not possible, explicitly set baseURL in the Better Auth configuration or define the BETTER_AUTH_URL environment variable; doing so disables the vulnerable header-derived fallback entirely and is the most effective compensating control with essentially no downside for a correctly deployed service. Additionally, terminate the application behind a reverse proxy or load balancer that strips or overwrites client-supplied X-Forwarded-Host and X-Forwarded-Proto headers before they reach the app, so only trusted forwarded values are honored - note this must be enforced at the trusted proxy layer, since app-level trust of these headers is exactly what is abused. Managed hosting platforms that already fix the base URL are not affected.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
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 framework-agnostic authentication library for Node.js/TypeScript applications, exposing its endpoints under a base path (typically /api/auth) derived from the configured baseURL. When baseURL is not set through configuration or the BETTER_AUTH_URL environment variable, the library falls back to reconstructing it from inbound request headers, implicitly trusting the X-Forwarded-Host and X-Forwarded-Proto values. getBaseURL() parses these into a URL object whose pathname then determines the router's basePath. Because the fallback caches the value derived from the first request, an attacker-controlled forwarded header set (e.g. Proto 'some:' and Host 'junk') corrupts the parsed pathname and the resulting basePath, after which the router can no longer match legitimate requests. The CWE-770 mapping (handling of a resource without proper limits or validation) captures the root cause loosely, though the more precise class is improper trust of client-supplied forwarded headers used to derive server routing state.
Know when Better Auth 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:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network unauthenticated (AV:N/PR:N/UI:N) but AC:H for the first-request race plus required unconfigured baseURL; impact is availability-only (A:H, C:N, I:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
better-auth (npm) before 1.4.2 allows an external request to configure baseURL when it is not otherwise defined (e.g., BETTER_AUTH_URL is unset). An attacker able to make the very first request to the server after startup can poison the router's base path, causing all routes to return 404 for all users (denial of service). The issue is not reachable when baseURL is explicitly configured or on typical managed hosting platforms.
Blast Radius
ecosystem impact- 4 npm packages depend on better-auth (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 1.4.2.
Articles & Coverage 1
Executive ViewAI
Better Auth (npm package) before version 1.4.2 is vulnerable to a complete authentication outage that can be triggered by publicly available exploit code. A single malicious HTTP request can permanently disable login for all users until the server restarts, with no workaround for locked-out customers. This creates an immediate, high-impact threat to business continuity and customer access.
Apply vendor patch.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Better Auth
View allBetter Auth is an authentication library for TypeScript. Rated high severity (CVSS 7.9), this vulnerability is remotely
Authorization bypass in the @better-auth/oauth-provider plugin for Better Auth (versions >= 1.4.8-beta.7 and < 1.6.5, pl
Privilege-escalating account takeover in the @better-auth/scim plugin (versions 1.4.0-beta.27 through 1.6.21 and 1.7.0-b
Authentication bypass in Better Auth before 1.6.11 stems from insecure cryptographic defaults in the legacy oidcProvider
Unauthenticated OAuth state values can be redeemed as Magic Link tokens in Better Auth 1.4.0-beta.18 through 1.7.6, lett
Authentication bypass in Better Auth's OAuth Proxy plugin (versions 1.5.0-beta.12 through 1.7.6) lets unauthenticated re
Path normalization bypass in Better Auth before v1.4.5 allows unauthenticated remote attackers to circumvent `disabledPa
Authorization bypass in @better-auth/scim versions 1.5.0 through 1.7.0-beta.3 allows any authenticated user to fully tak
Pre-account hijacking in better-auth (npm) allows a remote attacker to gain persistent, password-based access to any vic
Multiple authentication bypass vulnerabilities in @better-auth/sso before version 1.6.21 enable low-privileged attackers
Two domain-ownership authentication bypass flaws in @better-auth/sso allow authenticated organization owners to compromi
Better Auth versions 1.3.8-beta.3 to before 1.7.0-rc.3 with the deviceAuthorization plugin enabled are vulnerable to a U
EUVD-2025-210592
GHSA-3q45-2fh7-66cj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB