CVE-2025-71404

better-auth before 1.1.16 Reflected XSS via error parameter

Published Aug 1, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

better‑auth versions after v0.0.2 and before 1.1.16 contain a reflected Cross‑Site Scripting vulnerability on the /api/auth/error page, where the value of the error URL parameter is echoed into the page without proper neutralization. A malicious actor who persuades a user to visit a specially crafted link can inject and execute arbitrary JavaScript in the victim’s browser. The vulnerability is a classic CWE‑79 case and can be used to steal session cookies, submit data on behalf of the user, or perform other client‑side attacks while the user remains authenticated within the application’s domain.

Affected Systems

The flaw affects all installations of better‑auth, specifically versions later than v0.0.2 up through 1.1.15. The software is delivered as a Node.js-based OAuth provider and runs on any host that supports the Node.js runtime.

Risk and Exploitability

The CVSS score of 5.1 categorizes the issue as medium‑severity. No EPSS score is available and the vulnerability is not listed in CISA’s KEV catalog, indicating no public exploits are known at the time of analysis. The attack requires the victim to click a malicious link or otherwise load a crafted URL in their browser; authentication or privileged access is not required. Given the classic reflected XSS vector, the potential impact is limited to individual users, but the ability to hijack sessions or perform unauthorized actions can be significant if the target application handles sensitive data within the same origin.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade better‑auth to version 1.1.16 or later
  • If an immediate upgrade is impossible, modify the /api/auth/error handler to safely escape or strip the error parameter before rendering
  • Implement a strict Content Security Policy that disallows inline scripts and unsafe eval

Generated by OpenCVE AI on August 2, 2026 at 03:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Better-auth better Auth
Vendors & Products Better-auth better Auth
Type Values Removed Values Added
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.
Title better-auth before 1.1.16 Reflected XSS via error parameter
First Time appeared Better-auth
Better-auth better-auth\/oauth-provider
Weaknesses CWE-79
CPEs cpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:node.js:*:*
Vendors & Products Better-auth
Better-auth better-auth\/oauth-provider
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 3, 2026, 3:38 PM
Reserved
Jul 18, 2026, 12:38 PM
Status
Deferred
Published
Aug 1, 2026, 1:16 PM
Modified
Oct 6, 2026, 10:10 PM