GHSA-x732-6j76-qmhm: Better auth Better Auth's Rou3 Dependency Has Vulnerability
HIGHGHSA-x732-6j76-qmhm is a HIGH (CVSS 8.6) better auth's rou3 dependency has vulnerability (CWE-41: Improper Resolution of Path Equivalence) affecting Better auth libraries in the npm ecosystem. The issue involves better auth's rou3 dependency has double-slash path normalization which can bypass disabledpaths config and rate limits. Remediation is available by upgrading affected packages to version 1.4.5.
GHSA-x732-6j76-qmhm at a Glance
Security Impact
CVSS: 8.6
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:N/S:U/C:L/I:L/A:H).
How to Fix GHSA-x732-6j76-qmhm
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.4.5
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-x732-6j76-qmhm, 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.4.5), 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-41: Improper Resolution of Path Equivalence, where the product is vulnerable to file system contents disclosure through path equivalence. path equivalence involves the use of special characters in file and directory names. the associated manipulations are intended to generate multiple names for the same object. 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-x732-6j76-qmhm Affected Better auth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
better-auth
|
npm |
< 1.4.5
|
1.4.5
|
References
Frequently Asked Questions
What is GHSA-x732-6j76-qmhm?
Which Better auth versions are affected?
What version fixes GHSA-x732-6j76-qmhm?
Is better-auth affected?
What is the CVSS score of GHSA-x732-6j76-qmhm?
What CWE is associated with GHSA-x732-6j76-qmhm?
How can I check npm dependencies for GHSA-x732-6j76-qmhm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x732-6j76-qmhm",
"modified" : "2025-12-16T21:22:45Z",
"published" : "2025-12-16T21:22:45Z",
"aliases" : [ ],
"summary" : "Better Auth's rou3 Dependency has Double-Slash Path Normalization which can Bypass disabledPaths Config and Rate Limits",
"details" : "## Summary\n\nAn issue in the underlying router library **rou3** can cause `/path` and `//path` to be treated as identical routes. If your environment does **not** normalize incoming URLs (e.g., by collapsing multiple slashes), this can allow bypasses of `disabledPaths` and path-based rate limits.\n\n## Details\n\nBetter Auth uses **better-call**, which internally relies on **rou3** for routing. Affected versions of rou3 normalize paths by removing empty segments. As a result:\n\n* `/sign-in/email`\n* `//sign-in/email`\n* `///sign-in/email`\n\n…all resolve to the same route.\n\nSome production setups *automatically* collapse multiple slashes. This includes:\n\n* Vercel with Nextjs (default)\n* Cloudflare - when normalize to urls origin is enabled (https://developers.cloudflare.com/rules/normalization/settings/#normalize-urls-to-origin)\n\nIn these environments and other configurations where `//path` reach Better Auth as `/path`, the issue does not apply.\n\n## Fix\n\nUpdating rou3 to the latest version resolves the issue:\n\n* better-call previously depended on `\"rou3\": \"^0.5.1\"`\n* The fix was introduced after that version\n (commit: [https://github.com/h3js/rou3/commit/f60b43fa648399534507c9ac7db36d705b8874c3](https://github.com/h3js/rou3/commit/f60b43fa648399534507c9ac7db36d705b8874c3))\n\nBetter Auth recommends:\n\n1. **Upgrading to Better Auth v1.4.5 or later**, which includes the updated rou3.\n2. Ensuring the proxy normalizes URLs.\n3. If project maintainers cannot upgrade yet, they can protect their app by normalizing url before it reaches better-auth handler. See example below:\n```ts\nconst req = new Request(...) // this would be the actual request object\nconst url = new URL(req.url);\nconst normalizedPath = url.pathname.replace(/\\/+/g, \"/\");\n\nif (url.pathname !== normalizedPath) {\n url.pathname = normalizedPath;\n // Update the raw request pathname\n Object.defineProperty(req, \"url\", {\n value: url.toString(),\n writable: true,\n configurable: true,\n });\n}\n```\n\n## Impact\n\n* Bypass `disabledPaths`\n* Bypass path-based rate limits\n\nThe impact of bypassing disabled paths could vary based on a project's configuration.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "better-auth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/better-auth/better-auth/security/advisories/GHSA-x732-6j76-qmhm"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/better-auth/better-auth"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-41" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-16T21:22:45Z",
"nvd_published_at" : null
}
}