Horizon Alert
Summary of the vulnerability and why it matters
This advisory highlights a vulnerability in the better-auth authentication library that could allow an attacker to cause a denial of service by poisoning the router's base path. This occurs when the library is not properly configured, potentially impacting the availability of services for all users.
- A flaw lets attackers crash services if authentication isn't set up.
- Affects core service availability, impacting all users.
- Confirm if your authentication setup is exposed.
Attack Path
How an attacker could exploit the issue
An attacker who can send the very first request to a server after it starts can exploit this vulnerability. By manipulating the `baseURL` before it's properly defined, the attacker can cause all incoming requests to be misrouted, resulting in a denial of service for all users.
- Unauthenticated external network access required.
- First request after server startup poisons router.
- All routes return 404, causing denial of service.
Live Threat
Current exploitation, exposure, and threat context
When the `better-auth` npm package is not explicitly configured and an attacker can initiate the very first request after startup, they could potentially poison the router's base path. This could lead to all routes returning a 404 error for all users when the system is not running on typical managed hosting platforms. No system data, user data, or PII is indicated as at risk.
- Router's base path configuration.
- First request after startup by attacker.
- Denial of service for all users.
Operational Fix
Recommended remediation, mitigation, and detection steps
This vulnerability in the better-auth npm package could impact application owners and infrastructure teams responsible for authentication services. The first step is to identify all instances of this library within your environment, confirm if the `baseURL` is explicitly configured or if the application is hosted on a platform that mitigates this specific issue, and then locate the accountable owner for remediation.
- Application owners should own the issue.
- Verify explicit `baseURL` configuration.
- Plan updates during maintenance windows.