CVE-2025-71404: better-auth before 1.1.16 Reflected XSS via error parameter
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.
Security readout for executives and security teams
Plain-English summary
Affected better-auth installations can place attacker-controlled text into an authentication error page without safely encoding it. If someone is persuaded to open a crafted link, attacker-supplied JavaScript may run in that person’s browser under the application’s origin, potentially exposing or altering browser-accessible information.
Executive priority
Schedule prompt remediation through the normal vulnerability process, accelerating internet-facing or high-trust applications. The issue is not rated high or critical and requires user action, but browser-context script execution can undermine user trust and application data protections. No active exploitation is established by the supplied evidence.
Technical view
CVE-2025-71404 is reflected cross-site scripting in the /api/auth/error page. Versions after 0.0.2 and before 1.1.16 reflect the error URL parameter as HTML without proper neutralization. Exploitation is network-accessible, requires no privileges, and requires victim interaction. Version 1.1.16 fixes the issue.
Likely exposure
Exposure is most likely where a better-auth version after 0.0.2 but before 1.1.16 serves /api/auth/error to users. Internet-facing applications and users who may follow attacker-controlled links carry the clearest risk. The supplied evidence does not establish how commonly the vulnerable page is deployed.
Exploitation context
An attacker must convince a user to visit a specially crafted URL. Successful exploitation runs JavaScript in the application’s browser context, with potential low confidentiality and integrity impact. The CVSS 4.0 score is 5.1. This CVE is not identified as KEV, and the supplied sources do not establish active exploitation.
Researcher notes
The weakness is CWE-79. The CVSS 4.0 vector indicates remote access, low complexity, no privileges, active user interaction, low vulnerable-system confidentiality and integrity impact, and no availability impact. The patch is identified as commit 05ada0b79dbcac93cc04ceb79b23ca598d07830c. The bundle does not provide exploitation telemetry or affected deployment prevalence.
Mitigation direction
Upgrade better-auth to version 1.1.16 or later.
Prioritize upgrades for internet-facing applications exposing the authentication error page.
Review the vendor advisory and patch commit for implementation-specific guidance.
Until upgraded, restrict external access to the affected error route where operationally feasible.
Validation and detection
Inventory deployed better-auth versions, including lockfiles and production artifacts.
Confirm no deployment uses a version after 0.0.2 and before 1.1.16.
Verify the production application no longer renders error parameter values as HTML.
Test the error route safely in a controlled environment without executable content.
Confirm dependency scanners and asset inventories recognize the upgraded production version.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-79: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-79 · source CWE mapping
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.