GHSA-hq75-xg7r-rx6c: Better call Better Call Routing Bug Can Vulnerability
MODERATEGHSA-hq75-xg7r-rx6c is a MODERATE better call routing bug can vulnerability (CWE-525: Use of Web Browser Cache Containing Sensitive Information) affecting Better call libraries in the npm ecosystem. The issue involves better call routing bug can lead to cache deception. Remediation is available by upgrading affected packages to version 1.0.12.
GHSA-hq75-xg7r-rx6c at a Glance
How to Fix GHSA-hq75-xg7r-rx6c
To remediate this vulnerability, upgrade all affected Better call 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-call@1.0.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls better-call
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-hq75-xg7r-rx6c, inspect your project dependencies using npm:
npm ls better-call
Analyze the terminal output to locate any version of Better call in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.12), your application is affected.
Note: The npm ls better-call 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-525: Use of Web Browser Cache Containing Sensitive Information, where the web application does not use an appropriate caching policy that specifies the extent to which each web page and associated form fields should be cached. In Better call, 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-hq75-xg7r-rx6c Affected Better call Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
better-call
|
npm |
< 1.0.12
|
1.0.12
|
References
Frequently Asked Questions
What is GHSA-hq75-xg7r-rx6c?
Which Better call versions are affected?
What version fixes GHSA-hq75-xg7r-rx6c?
Is better-call affected?
What CWE is associated with GHSA-hq75-xg7r-rx6c?
How can I check npm dependencies for GHSA-hq75-xg7r-rx6c?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hq75-xg7r-rx6c",
"modified" : "2025-07-11T17:09:53Z",
"published" : "2025-07-11T17:09:53Z",
"aliases" : [ ],
"summary" : "Better Call routing bug can lead to Cache Deception",
"details" : "### Summary\n\nUsing a CDN that caches (`/**/*.png`, `/**/*.json`, `/**/*.css`, etc...) requests, a cache deception can emerge. This could lead to unauthorized access to user sessions and personal data when cached responses are served to other users.\n\n### Details\n\nThe vulnerability occurs in the request processing logic where path sanitization is insufficient. The library splits the path using `config.basePath` but doesn't properly validate the remaining path components. This allows specially crafted requests that appear to be static assets (like `/api/auth/get-session/api/auth/image.png` assuming `config.basePath`=`/api/auth`) to bypass typical CDN cache exclusion rules while actually returning sensitive data.\n\nThe problematic code [here](https://github.com/Bekacru/better-call/blob/8b6f13e24fad7f4666a582601517bb3232d4f4af/src/router.ts#L124):\n```js\n\tconst processRequest = async (request: Request) => {\n\t\tconst url = new URL(request.url);\n\t\tconst path = config?.basePath ? url.pathname.split(config.basePath)[1] : url.pathname;\n```\n\nSince this library is largely coupled with `better-auth`, it becomes more clear why this can be dangerous with an example request:\n\n<img width=\"800\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2ab7c4dd-0700-4f59-863f-79f2b5edbb37\" />\n\n### Impact\n\nThis is a cache deception vulnerability affecting `better-call` users with CDN caching enabled. which can expose sensitive data.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "better-call"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Bekacru/better-call/security/advisories/GHSA-hq75-xg7r-rx6c"
}, {
"type" : "WEB",
"url" : "https://github.com/Bekacru/better-call/commit/7c7d31b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Bekacru/better-call"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-525" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-11T17:09:53Z",
"nvd_published_at" : null
}
}