Better Auth URL parameter HTML Injection (Reflected Cross-Site scripting)
Affects better-authSource GCVE Database
CVSS 5.1 Medium : upgrade to 1.1.16 when convenient.
Data as of 27 Nov 2026, 04:49 UTC
- Patch
- Available – fixed in 1.1.16
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:NWhat to do
Upgrade better-auth to 1.1.16.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmbetter-auth | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade better-auth to version 1.1.16 or later, where this reflected XSS vulnerability has been fixed. No additional mitigation steps are required once the patch is applied.
Description
The better-auth package had a reflected cross-site scripting (XSS) vulnerability in its /api/auth/error page. The vulnerability was due to the error URL parameter being reflected as HTML without proper sanitization. This allowed attackers to execute arbitrary JavaScript in the context of the user's browser by tricking them into visiting a crafted URL. The issue affects versions from 0.0.2 up to but not including 1.1.16. A fix is available in version 1.1.16.
References
- github.com/better-auth/better-auth/security/advisories/GHSA-9x4v-xfq5-m8x5 (opens in a new tab)
- github.com/better-auth/better-auth/commit/7ae340e2eddad641b7e43d24d37c58a66ce9ddcf (opens in a new tab)
- github.com/better-auth/better-auth (opens in a new tab)
- github.com/better-auth/better-auth/blob/05ada0b79dbcac93cc04ceb79b23ca598d07830c/packages/better-auth/src/api/routes/error.ts (opens in a new tab)