GHSA-vp58-j275-797x: Better auth Better Auth Allows Bypassing The Vulnerability
HIGHGHSA-vp58-j275-797x is a HIGH (CVSS 7.1) better auth allows bypassing the vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Better auth libraries in the npm ecosystem. The issue involves better auth allows bypassing the trustedorigins protection which leads to ato. Remediation is available by upgrading affected packages to version 1.1.21.
GHSA-vp58-j275-797x at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N).
How to Fix GHSA-vp58-j275-797x
To remediate this vulnerability, upgrade all affected Better auth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install better-auth@1.1.21
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls better-auth
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-vp58-j275-797x, inspect your project dependencies using npm:
npm ls better-auth
Analyze the terminal output to locate any version of Better auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.21), your application is affected.
Note: The npm ls better-auth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Better auth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-vp58-j275-797x Affected Better auth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
better-auth
|
npm |
< 1.1.21
|
1.1.21
|
References
Frequently Asked Questions
What is GHSA-vp58-j275-797x?
Which Better auth versions are affected?
What version fixes GHSA-vp58-j275-797x?
Is better-auth affected?
What is the CVSS score of GHSA-vp58-j275-797x?
What CWE is associated with GHSA-vp58-j275-797x?
How can I check npm dependencies for GHSA-vp58-j275-797x?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vp58-j275-797x",
"modified" : "2025-12-09T16:27:07Z",
"published" : "2025-02-24T20:49:50Z",
"aliases" : [ ],
"summary" : "Better Auth allows bypassing the trustedOrigins Protection which leads to ATO",
"details" : "### Summary\n\nA 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.\n\nBecause 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "better-auth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.21"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.1.20"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/better-auth/better-auth/security/advisories/GHSA-vp58-j275-797x"
}, {
"type" : "WEB",
"url" : "https://github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/better-auth/better-auth"
}, {
"type" : "WEB",
"url" : "https://github.com/better-auth/better-auth/blob/ddebd0358d74376ea64541512d0167dd4377f182/packages/better-auth/src/api/middlewares/origin-check.ts#L53"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-24T20:49:50Z",
"nvd_published_at" : null
}
}