CVE-2025-71404
JSON

5.1medium

better-auth before 1.1.16 Reflected XSS via error parameter

Severity
5.1medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.72% (higher than 50% of CVEs)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-9x4v-xfq5-m8x5

Description

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.

Affected

Product or packageVersionsReported by
better-auth better-authbefore 1.1.16
Not affected: 1.1.16
CVE List
better-auth (npm)from 0.0.2 before 1.1.16GitHub Advisory Database

All scores

VulnCheck5.1medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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.

NVD (es)

Las versiones de better-auth posteriores a la v0.0.2 y anteriores a la 1.1.16 contienen una vulnerabilidad de cross-site scripting (XSS) reflejado en la página /API/auth/error, donde el valor del parámetro URL 'error' se refleja como HTML sin la neutralización adecuada. Un atacante que coacciona a un usuario para que visite una URL especialmente diseñada puede ejecutar JavaScript arbitrario en el contexto del navegador del usuario. El problema está solucionado en la versión 1.1.16.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-71404 changed 2026-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-9x4v-xfq5-m8x5 changed 2026-08-02CC-BY-4.0
NVDCVE-2025-71404 changed 2026-10-06Public domain