---
id: CVE-2026-118662
aliases:
  - GHSA-8g5g-mxqh-grgj
title: 'Vite: `server.fs.deny` bypassed with queries'
summary: 'Vite: `server.fs.deny` bypassed with queries'
severity: medium
cwe:
  - CWE-180
  - CWE-284
vendor: vite
product: vite
ecosystem: npm
affected:
  - vite = 6.4.4
patched:
  - vite 6.4.5
published: '2026-10-29'
updated: '2026-10-29'
sourceUpdated: '2026-10-29T16:39:59Z'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-8g5g-mxqh-grgj'
references:
  - url: 'https://github.com/vitejs/vite/security/advisories/GHSA-8g5g-mxqh-grgj'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-118662'
  - url: 'https://github.com/vitejs/vite/pull/22160'
  - url: 'https://github.com/vitejs/vite/pull/23855'
  - url: >-
      https://github.com/vitejs/vite/commit/91e40d7bf9777057bbd31c3eb036a54c9465697e
  - url: 'https://github.com/vitejs/vite/releases/tag/v6.4.5'
  - url: 'https://github.com/advisories/GHSA-8g5g-mxqh-grgj'
tags:
  - ghsa
  - npm
epss: 0.00295
epssPercentile: 0.22102
ingestedAt: '2026-10-29T17:39:38.160Z'
---

## Overview

### Summary

The contents of files that are specified by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) can be returned to the browser. This is the same as https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r.

### Impact

Only apps that match the following conditions are affected:

- explicitly exposes the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host))
- the sensitive file exists in the allowed directories specified by [`server.fs.allow`](https://vite.dev/config/server-options#server-fs-allow)
- the sensitive file is denied with a pattern that matches a file by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny)

### 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 https://github.com/vitejs/vite/security/advisories/GHSA-rq7h-c2jc-7f22, v6.4.4 back-ported https://github.com/vitejs/vite/pull/20410. But while that PR requires https://github.com/vitejs/vite/pull/22160 for https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r, https://github.com/vitejs/vite/pull/22160 wasn't back-ported together causing v6 vulnerable to https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r.

## Affected packages

- `vite = 6.4.4`

## Remediation

Upgrade to a patched release:

- `vite 6.4.5`
