CVE-2025-71401: better-auth before 1.4.2 basePath Modification DoS
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.
Security readout for executives and security teams
Plain-English summary
A remote attacker who reaches a vulnerable better-auth server first after startup may corrupt its routing configuration. The service can then return 404 errors across all routes, disrupting authentication and dependent applications until recovery. Exposure requires baseURL to be undefined; explicitly configured deployments and typical managed hosting platforms are reported as not reachable.
Executive priority
Treat exposed, self-hosted deployments as an urgent availability risk because one unauthenticated request at startup can disrupt all routes. Upgrade and confirm explicit configuration promptly. Lower priority only after validating that baseURL is fixed or the deployment model makes the flaw unreachable.
Technical view
In better-auth versions before 1.4.2, an external first request can influence baseURL when no value is configured, poisoning the router’s base path and causing service-wide 404 responses. The supplied CVSS v4.0 score is 9.3. The described outcome is denial of service, contingent on startup timing and missing baseURL configuration.
Likely exposure
Prioritize self-hosted better-auth deployments below 1.4.2 where baseURL or BETTER_AUTH_URL is unset and an external request can arrive immediately after startup. Explicit baseURL configuration prevents the documented path. The bundle also says typical managed hosting platforms are not reachable, but does not identify specific platforms.
Exploitation context
The attack is remote, unauthenticated, and requires the attacker’s request to be the first after server startup. The bundle reports no KEV listing and provides no evidence of active exploitation. Successful abuse causes routing failure and denial of service rather than a documented data breach.
Researcher notes
The supplied sources disagree in labeling: the CVE bundle and GitHub advisory identify versions before 1.4.2, while the VulnCheck reference title says before 1.4.1. Use the vendor advisory and installed-package evidence as authoritative. No active exploitation is established. CWE-770 is assigned, although the described mechanism is router configuration poisoning.
Mitigation direction
Upgrade better-auth to version 1.4.2 or later.
Explicitly configure baseURL or BETTER_AUTH_URL using the deployment’s trusted canonical URL.
Check the vendor advisory for deployment-specific recovery or mitigation guidance.
Control external traffic during restarts until configuration and upgrade status are verified.
Validation and detection
Inventory better-auth versions and identify every deployment below 1.4.2.
Confirm baseURL or BETTER_AUTH_URL is explicitly set before accepting requests.
Verify expected routes return normal responses after each restart.
Review monitoring for widespread 404 responses beginning immediately after server startup.
Confirm managed-hosting assumptions against the vendor advisory and actual deployment configuration.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-770: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-770 · source CWE mapping
Allocation of Resources Without Limits or Throttling
Allocation of Resources Without Limits or Throttling represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.