5.9Medium

CVE-2025-71401better-auth before 1.4.2 basePath Modification DoS

better-auth better-auth Published: (3 months ago)

Description

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.

Weakness (CWE): CWE-770

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
better-auth better-auth < 1.4.2, fixed 1.4.2
better-auth better-auth/oauth-provider < 1.4.2

References and patches