Skip to content

Commit 4d1d121

Browse files
1 parent 00c8a9c commit 4d1d121

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-9x4v-xfq5-m8x5",
4+
"modified": "2025-02-05T21:49:39Z",
5+
"published": "2025-02-05T21:49:39Z",
6+
"aliases": [],
7+
"summary": "Better Auth URL parameter HTML Injection (Reflected Cross-Site scripting)",
8+
"details": "### Summary\nThe better-auth `/api/auth/error` page was vulnerable to HTML injection, resulting in a reflected cross-site scripting (XSS) vulnerability.\n\n### Details\nThe value of `error` URL parameter was reflected as HTML on the error page: https://github.com/better-auth/better-auth/blob/05ada0b79dbcac93cc04ceb79b23ca598d07830c/packages/better-auth/src/api/routes/error.ts#L81\n\n### PoC\n\nhttps://demo.better-auth.com/api/auth/error?error=%3Cscript%3Ealert(1)%3C/script%3E\n\n![image](https://github.com/user-attachments/assets/35b1b95d-3dc9-45fd-89cd-20cd0361bb6c)\n\n### Impact\nAn attacker who exploited this vulnerability by coercing a user to visit a specially-crafted URL could execute arbitrary JavaScript in the context of the user's browser.\n\nBecause better-auth is a dependency of web applications, the impact of such a vulnerability is unknowable; it depends on the functionality of the application/site using better-auth. I have calculated the CVSS score assuming the hypothetical victim is an administrator with elevated permissions and access.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "npm",
19+
"name": "better-auth"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0.0.2"
27+
},
28+
{
29+
"fixed": "1.1.16"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/better-auth/better-auth/security/advisories/GHSA-9x4v-xfq5-m8x5"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/better-auth/better-auth/commit/7ae340e2eddad641b7e43d24d37c58a66ce9ddcf"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/better-auth/better-auth"
48+
},
49+
{
50+
"type": "WEB",
51+
"url": "https://github.com/better-auth/better-auth/blob/05ada0b79dbcac93cc04ceb79b23ca598d07830c/packages/better-auth/src/api/routes/error.ts#L81"
52+
}
53+
],
54+
"database_specific": {
55+
"cwe_ids": [
56+
"CWE-79"
57+
],
58+
"severity": "CRITICAL",
59+
"github_reviewed": true,
60+
"github_reviewed_at": "2025-02-05T21:49:39Z",
61+
"nvd_published_at": null
62+
}
63+
}

0 commit comments

Comments
 (0)