Packages / vite / Security

ModerateVulnerabilityGHSA-8g5g-mxqh-grgjCVE-2026-118662Published 29 Oct 2026

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

Your version

Affected releases · vite

  • 6.x6.4.4Fixed in 6.4.5

On 6.x, the newest line:

npm install vite@6.4.5
Every release on a timeline
8.x
  1. Not affected

    8.0.0 – 8.3.8

    39 releases, latest

6.x
  1. Not affected

    6.0.0 – 6.4.3

    43 releases

  2. Affected

    6.4.4

    1 release

  3. Fixed

    6.4.5 – 6.4.6

    2 releases

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

What happens

Summary

The contents of files that are specified by server.fs.deny can be returned to the browser. This is the same as github.com/vitejs/vite/security/advisories/GHSA….

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.

For the fix for github.com/vitejs/vite/security/advisories/GHSA…, v6.4.4 back-ported #20410. But while that PR requires #22160 for github.com/vitejs/vite/security/advisories/GHSA…, #22160 wasn't back-ported together causing v6 vulnerable to github.com/vitejs/vite/security/advisories/GHSA….

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.