CVE-2025-71404
mediumpriority · track · 0EPSS 0.005 · 44 %ileEUUSEPSS · scored 2026-10-27
better-auth versions after v0.0.2 and before 1.1.16 contain a reflected cross-site scripting (XSS) vulnerability on the /api/auth/error page, where the value of the 'error' URL parameter is reflected as HTML without proper neutralization. An attacker who coerces a user into visiting a specially-crafted URL can execute arbitrary JavaScript in the context of the user's browser. The issue is fixed in version 1.1.16.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.2–5.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (2)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-9x4v-xfq5-m8x5Better Auth URL parameter HTML Injection (Reflected Cross-Site scripting)2025-02-05ghsa · osvUS
### Summary The better-auth `/api/auth/error` page was vulnerable to HTML injection, resulting in a reflected cross-site scripting (XSS) vulnerability. ### Details The value of `error` URL parameter was reflected as HTML on the error page: https://github.com/better-auth/better-auth/blob/05ada0b79dbcac93cc04ceb79b23ca598d07830c/packages/better-auth/src/api/routes/error.ts#L81 ### Impact An attacker who exploited this vulnerability by coercing a user to visit a specially-crafted URL could execute arbitrary JavaScript in the context of the user's browser.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://github.com/better-auth/better-auth/commit/05ada0b79dbcac93cc04ceb79b23ca598d07830ccnnvd
- https://github.com/better-auth/better-auth/releasesPatchcnnvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-9x4v-xfq5-m8x5cnnvd
- https://www.vulncheck.com/advisories/better-auth-before-reflected-xss-via-error-parametercnnvd
- https://github.com/better-auth/better-auth/commit/05ada0b79dbcac93cc04ceb79b23ca598d07830cenisa_euvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-9x4v-xfq5-m8x5enisa_euvd
- https://www.vulncheck.com/advisories/better-auth-before-reflected-xss-via-error-parameterenisa_euvd
- https://github.com/better-auth/better-auth/commit/05ada0b79dbcac93cc04ceb79b23ca598d07830cnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan