Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. GHSA-hjpm-7mrm-26w8

GHSA-hjpm-7mrm-26w8: Beter Auth has an Open Redirect via Scheme-Less Callback Parameter

February 24, 2025

The application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs (e.g., https://evil.com), it incorrectly allows scheme-less URLs (e.g., //malicious-site.com). This results in the browser interpreting the URL as https://malicious-site.com, leading to unintended redirection.

bypass for : https://github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723

References

  • github.com/advisories/GHSA-hjpm-7mrm-26w8
  • github.com/better-auth/better-auth
  • github.com/better-auth/better-auth/commit/24659aefc35a536b95ea4e5347e52c8803910153
  • github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723
  • github.com/better-auth/better-auth/security/advisories/GHSA-hjpm-7mrm-26w8

Code Behaviors & Features

Detect and mitigate GHSA-hjpm-7mrm-26w8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.1.20

Fixed versions

  • 1.1.20

Solution

Upgrade to version 1.1.20 or above.

Weakness

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

Source file

npm/better-auth/GHSA-hjpm-7mrm-26w8.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:16:10 +0000.