HighGHSA-v2wj-q39q-566rCVE-2026-39364

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

Published 6 Apr 2026 · Updated 10 Sept 2026

Affected packages

vitenpm
Affected
>=8.0.0 <8.0.5
Fixed in
8.0.5
Update to the fixed version for your release line, for example:npm install vite@8.0.5
vitenpm
Affected
>=7.1.0 <7.3.2
Fixed in
7.3.2
Update to the fixed version for your release line, for example:npm install vite@7.3.2

Details

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 <img width="3944" height="1092" alt="image" src="https://github.com/user-attachments/assets/ecb9f2e0-e08f-4ac7-b194-e0f988c4cd4f" /> 3. Confirm that the same files can be retrieved with query parameters (expect 200): <img width="2014" height="373" alt="image" src="https://github.com/user-attachments/assets/76bc2a6a-44f4-4161-ae47-eab5ae0c04a8" />

Is GHSA-v2wj-q39q-566r in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected vite, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.