Skip to main content

Better Auth EUVDEUVD-2025-210592

| CVE-2025-71401 CRITICAL
Allocation of Resources Without Limits or Throttling (CWE-770)
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Wait for server startup/restart
  2. Delivery
    Send first request with forged X-Forwarded-Host/Proto
  3. Exploit
    getBaseURL derives poisoned basePath
  4. Execution
    Router caches corrupted base path
  5. Persist
    All auth routes return 404 for all users
  6. Impact
    Repeat 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

better-auth 0 <1.4.1

Affected Packages

npm better-auth fix: 1.4.1, 1.4.2

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

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
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
vuln.today AI 5.9 MEDIUM

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).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 02, 2026 - 13:01 EUVD
CVE Published
Aug 02, 2026 - 12:15 cve.org
CRITICAL 9.3

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 npm packages depend on better-auth (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 1.4.2.

Executive ViewAI

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular but not ubiquitous Node.js auth library, growing adoption
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2024-56734 HIGH POC
7.9 Dec 30

Better Auth is an authentication library for TypeScript. Rated high severity (CVSS 7.9), this vulnerability is remotely

CVE-2026-41427 HIGH POC
7.1 Apr 24

Authorization bypass in the @better-auth/oauth-provider plugin for Better Auth (versions >= 1.4.8-beta.7 and < 1.6.5, pl

CVE-2026-67330 CRITICAL
9.4 Aug 01

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

CVE-2026-67336 CRITICAL
9.4 Aug 01

Authentication bypass in Better Auth before 1.6.11 stems from insecure cryptographic defaults in the legacy oidcProvider

CVE-2026-114607 CRITICAL
9.1 Oct 22

Unauthenticated OAuth state values can be redeemed as Magic Link tokens in Better Auth 1.4.0-beta.18 through 1.7.6, lett

CVE-2026-110864 CRITICAL
9.1 Oct 14

Authentication bypass in Better Auth's OAuth Proxy plugin (versions 1.5.0-beta.12 through 1.7.6) lets unauthenticated re

CVE-2025-71399 HIGH
8.8 Aug 02

Path normalization bypass in Better Auth before v1.4.5 allows unauthenticated remote attackers to circumvent `disabledPa

CVE-2026-67331 HIGH
8.7 Aug 01

Authorization bypass in @better-auth/scim versions 1.5.0 through 1.7.0-beta.3 allows any authenticated user to fully tak

CVE-2026-67327 HIGH
8.7 Aug 01

Pre-account hijacking in better-auth (npm) allows a remote attacker to gain persistent, password-based access to any vic

CVE-2026-67328 HIGH
8.6 Aug 01

Multiple authentication bypass vulnerabilities in @better-auth/sso before version 1.6.21 enable low-privileged attackers

CVE-2026-80192 HIGH
8.6 Aug 25

Two domain-ownership authentication bypass flaws in @better-auth/sso allow authenticated organization owners to compromi

CVE-2026-109346 HIGH
8.5 Oct 12

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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy