Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. GHSA-vp58-j275-797x

GHSA-vp58-j275-797x: Better Auth allows bypassing the trustedOrigins Protection which leads to ATO

February 24, 2025 (updated December 9, 2025)

A bypass was discovered in the trustedOrigins validation logic—affecting both absolute URL entries and wildcard domain patterns. This flaw allows an attacker to construct a malicious callbackURL that passes origin checks and triggers an open redirect.

Because redirect endpoints include sensitive tokens (such as password-reset tokens), this vulnerability can enable one-click account takeover if a victim clicks a crafted link.

References

  • github.com/advisories/GHSA-vp58-j275-797x
  • github.com/better-auth/better-auth
  • github.com/better-auth/better-auth/blob/ddebd0358d74376ea64541512d0167dd4377f182/packages/better-auth/src/api/middlewares/origin-check.ts
  • github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80
  • github.com/better-auth/better-auth/security/advisories/GHSA-vp58-j275-797x

Code Behaviors & Features

Detect and mitigate GHSA-vp58-j275-797x with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.1.21

Fixed versions

  • 1.1.21

Solution

Upgrade to version 1.1.21 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

npm/better-auth/GHSA-vp58-j275-797x.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:36 +0000.