Advisory

GHSA-9x4v-xfq5-m8x5

Also known as: CVE-2025-71404

Summary

Better Auth URL parameter HTML Injection (Reflected Cross-Site scripting)

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-02-05 21:49 UTC
Modified
2026-08-02 03:56 UTC

Affected packages and fixes

better-auth

npm · All systems

Affected

  • introduced 0.0.2, fixed 1.1.16 (semver)

Fixed versions

1.1.16

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences