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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.86% (percentile 56, 2026-11-26)
- **CWE:** CWE-178, CWE-200, CWE-284
- **Aliases:** GHSA-c24v-8rfc-w8vw
- **Published:** 2024-01-19T19:43:17.404Z
- **Modified:** 2026-09-10T03:49:24.667Z

## Who should check

- Projects that depend on npm package vite (\>= 2.7.0, \< 2.9.17)
- Anyone running 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

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

## Affected and fixed versions

- npm `vite`: affected \>= 2.7.0, \< 2.9.17; fixed 2.9.17, 3.2.8, 4.5.2, 5.0.12 (osv)
- 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 (cvelist)

## Mitigation

- Upgrade vite to one of 2.9.17, 3.2.8, 4.5.2, 5.0.12 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-23331. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-23331.md
Affected: vite >= 2.7.0, < 2.9.17
Fixed in: 2.9.17, 3.2.8, 4.5.2, 5.0.12

Steps:
1. Search this machine and project for vite (npm), vitejs vite: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-23331 being exploited?

There is no confirmed exploitation: CVE-2024-23331 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.86% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-23331?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-23331?

vite \>= 2.7.0, \< 2.9.17.

### Is there a fix for CVE-2024-23331?

Yes. Fixed in 2.9.17, 3.2.8, 4.5.2, 5.0.12. Upgrade vite to one of 2.9.17, 3.2.8, 4.5.2, 5.0.12 (or later in the same release line).

### How do I check if I'm affected by CVE-2024-23331?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/vitejs/vite/security/advisories/GHSA-c24v-8rfc-w8vw>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-34092>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-23331>
- patch: <https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5>
- patch: <https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691>
- patch: <https://github.com/vitejs/vite/commit/a26c87d20f9af306b5ce3ff1648be7fa5146c278>
- patch: <https://github.com/vitejs/vite/commit/eeec23bbc9d476c54a3a6d36e78455867185a7cb>
- other: <https://vitejs.dev/config/server-options.html#server-fs-deny>
- other: <https://github.com/vitejs/vite>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-23331>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-c24v-8rfc-w8vw> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-23331> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-23331>
