Packages / vite / Security

HighVulnerabilityGHSA-v2wj-q39q-566rCVE-2026-39364Published 6 Apr 2026

Vite: `server.fs.deny` bypassed with queries

Affected releases · vite

  • 8.x8.0.0 – 8.0.4Fixed in 8.0.5
  • 7.x7.1.0 – 7.3.1Fixed in 7.3.2

On 8.x, the newest line:

npm install vite@8.0.5
8.x
  1. Affected

    8.0.0 – 8.0.4

    5 releases

  2. Fixed

    8.0.5 – 8.3.5

    29 releases, latest

7.x
  1. Not affected

    7.0.0 – 7.0.8

    9 releases

  2. Affected

    7.1.0 – 7.3.1

    22 releases

  3. Fixed

    7.3.2 – 7.3.7

    5 releases

440 stable releases of vite, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for vite. It is read in your browser and sent nowhere.

What happens

Summary

The contents of files that are specified by server.fs.deny can be returned to the browser.

Impact

Only apps that match the following conditions are affected:

Details

On the Vite dev server, files that should be blocked by server.fs.deny (e.g., .env, *.crt) can be retrieved with HTTP 200 responses when query parameters such as ?raw, ?import&raw, or ?import&url&inline are appended.

PoC

  1. Start the dev server: pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort

  2. Confirm that server.fs.deny is enforced (expect 403): curl -i http://127.0.0.1:5175/src/.env | head -n 20

  3. Confirm that the same files can be retrieved with query parameters (expect 200):