CVE-2024-45811 server.fs.deny bypassed when using ?import&raw in vite
MediumCVSS 4.8
EPSS 1.1%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
Description
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm vite(npm) | < 3.2.11; <= 3.2.10; >= 4.0.0, < 4.5.4; >= 4.0.0, <= 4.5.3 +7 more | 3.2.11, 4.5.4, 5.1.8, 5.2.14, 5.3.6, 5.4.6 | Fixed |
| vitejs vite | < 3.2.11; = < 3.2.11; = >= 4.0.0, < 4.5.5; = >= 5.0.0, < 5.2.14 +6 more | 3.2.11, 4.5.5, 5.2.14, 5.3.6, 5.4.6 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm vite(npm) | >= 5.4.0, <= 5.4.5 | No fix listed |
| npm vite(npm) | >= 5.3.0, <= 5.3.5 | No fix listed |
| npm vite(npm) | >= 4.0.0, <= 4.5.3 | No fix listed |
| npm vite(npm) | <= 3.2.10 | No fix listed |
| npm vite(npm) | >= 5.2.0, < 5.2.14 | 5.2.14 |
| npm vite(npm) | >= 5.0.0, <= 5.1.7 | No fix listed |
| vitejs vite | = >= 5.4.0, < 5.4.6 | No fix listed |
| vitejs vite | = >= 5.3.0, < 5.3.6 | No fix listed |
| vitejs vite | = >= 5.0.0, < 5.2.14 | No fix listed |
| vitejs vite | = >= 4.0.0, < 4.5.5 | No fix listed |
| vitejs vite | = < 3.2.11 | No fix listed |
| vitejs vite | >= 5.4.0, < 5.4.6 | 5.4.6 |
| vitejs vite | >= 5.3.0, < 5.3.6 | 5.3.6 |
| vitejs vite | >= 5.0.0, < 5.2.14 | 5.2.14 |
| vitejs vite | >= 4.0.0, < 4.5.5 | 4.5.5 |
| vitejs vite | < 3.2.11 | 3.2.11 |
| npm vite(npm) | >= 5.4.0, < 5.4.6 | 5.4.6 |
| npm vite(npm) | >= 5.3.0, < 5.3.6 | 5.3.6 |
| npm vite(npm) | >= 4.0.0, < 4.5.4 | 4.5.4 |
| npm vite(npm) | < 3.2.11 | 3.2.11 |
| npm vite(npm) | >= 5.0.0, < 5.1.8 | 5.1.8 |
References
- https://github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx vendor-advisory
- github.com patch
- https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34 patch
- github.com patch
- github.com patch
- github.com patch
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product