CVE-2024-23331 Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
Description
Vite is a frontend tooling framework for javascript. The Vite dev server option server.fs.deny can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows. This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems. Since picomatch defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible. By requesting raw filesystem paths using augmented casing, the matcher derived from config.server.fs.deny fails to block access to sensitive files. This issue has been addressed in vite@5.0.12, vite@4.5.2, vite@3.2.8, and vite@2.9.17. Users are advised to upgrade. Users unable to upgrade should restrict access to dev servers.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm vite(npm) | >= 2.7.0, < 2.9.17; >= 2.7.0, <= 2.9.16; >= 3.0.0, < 3.2.8; >= 3.0.0, <= 3.2.7 +4 more | 2.9.17, 3.2.8, 4.5.2, 5.0.12 | Fixed |
| vitejs vite | = >=2.7.0, < 2.9.17; = >=3.0.0, <3.2.8; = >=4.0.0, < 4.5.2; = >=5.0.0, < 5.0.12 +4 more | 2.9.17, 3.2.8, 4.5.2, 5.0.12 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm vite(npm) | >= 2.7.0, <= 2.9.16 | No fix listed |
| npm vite(npm) | >= 3.0.0, <= 3.2.7 | No fix listed |
| npm vite(npm) | >= 4.0.0, <= 4.5.1 | No fix listed |
| npm vite(npm) | >= 5.0.0, <= 5.0.11 | No fix listed |
| vitejs vite | = >=2.7.0, < 2.9.17 | No fix listed |
| vitejs vite | = >=3.0.0, <3.2.8 | No fix listed |
| vitejs vite | = >=4.0.0, < 4.5.2 | No fix listed |
| vitejs vite | = >=5.0.0, < 5.0.12 | No fix listed |
| vitejs vite | >= 2.7.0, < 2.9.17 | 2.9.17 |
| vitejs vite | >= 3.0.0, < 3.2.8 | 3.2.8 |
| vitejs vite | >= 4.0.0, < 4.5.2 | 4.5.2 |
| vitejs vite | >= 5.0.0, < 5.0.12 | 5.0.12 |
| npm vite(npm) | >= 2.7.0, < 2.9.17 | 2.9.17 |
| npm vite(npm) | >= 3.0.0, < 3.2.8 | 3.2.8 |
| npm vite(npm) | >= 4.0.0, < 4.5.2 | 4.5.2 |
| npm vite(npm) | >= 5.0.0, < 5.0.12 | 5.0.12 |
References
- https://github.com/vitejs/vite/security/advisories/GHSA-c24v-8rfc-w8vw exploit vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5 patch
- github.com patch
- github.com patch
- https://vitejs.dev/config/server-options.html#server-fs-deny product
- github.com
- github.com product