Quick answers
- Is CVE-2025-71401 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2025-71401 being exploited in the wild.
- How severe is CVE-2025-71401?
- High severity, with a CVSS score of 5.9, published 2 August 2026.
- Which products and versions are affected?
- better-auth (npm) < 1.4.2, SEMVER:introduced=0,fixed=1.4.2.
- Is there a fix for CVE-2025-71401?
- Yes. better-auth (npm): upgrade to 1.4.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2025-71401 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2025-71401?
- Check whether you run better-auth (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- better-auth (npm): upgrade to 1.4.2 or later
npm install better-auth@1.4.2
Technical details
The vulnerability exists in Better Auth's baseURL initialization logic, which falls back to extracting configuration from X-Forwarded-Host and X-Forwarded-Proto headers when the BETTER_AUTH_URL environment variable is not set. An attacker who sends the first request to the server after startup can craft these headers (e.g., X-Forwarded-Proto: "some:" and X-Forwarded-Host: "junk") to poison the router's basePath derivation. Once poisoned, the basePath remains corrupted until server restart, causing all routing to fail with 404 responses for legitimate requests. The attack requires no authentication and is network-reachable, but exploitability is limited to servers without explicit baseURL configuration and where the attacker can time the first request after startup. Patch is available in version 1.4.2.
Affected products
- better-auth better-auth < 1.4.2
Identifiers
- CVE-2025-71401
- GHSA-569q-mpph-wgww
Timeline
- 2025-12-01: disclosed
- 2025-11-25: patched: Fixed in v1.4.2
References
- https://github.com/better-auth/better-auth/security/advisories/GHSA-569q-mpph-wgww
- https://github.com/ray-project/ray/commit/70e7c72780bdec075dba6cad1afe0832772bfe09
- https://github.com/better-auth/better-auth
- https://github.com/better-auth/better-auth/releases/tag/v1.4.2
- https://www.vulncheck.com/advisories/better-auth-before-basepath-modification-dos