---
id: "CVE-2026-118662"
kind: "vulnerability"
aliases: ["CVE-2026-118662"]
title: "Vite: dev server leaks denied files via loader query parameters"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["frontend", "javascript", "package", "self-hosted", "vite"]
not_affected_if: ["auth-required", "localhost-only-dev", "production-static-build"]
published_at: "2026-10-28T21:16:56+00:00"
first_seen_at: "2026-10-28T21:35:45+00:00"
updated_at: "2026-10-28T21:36:36+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118662", "first_seen_at": "2026-10-28T21:35:45+00:00"}]
---

# Vite: dev server leaks denied files via loader query parameters

Vite's development server checks server.fs.deny before removing loader query parameters such as ?raw, so an appended query can bypass the deny rule. An unauthenticated attacker who can reach an exposed dev server can read a sensitive file that sits inside server.fs.allow but matches server.fs.deny.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `npx vite --version` in the project and check whether it reports a version from 6.4.4 up to but not including 6.4.5.
- Check whether the dev server is reachable from the network (for example `vite --host` or `server.host` set to true or 0.0.0.0 in vite.config).
- Check `server.fs.deny` and `server.fs.allow` in vite.config for a sensitive file inside an allowed directory.

## Fix

- Upgrade `vite` to `6.4.5` or later.
- Do not expose the Vite dev server to untrusted networks until upgraded.

## Timeline

- 2026-10-28T21:35:45+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118662

## From the sources

Vite is a frontend tooling framework for JavaScript. From 6.4.4 until 6.4.5, the Vite development server can evaluate server.fs.deny before stripping loader query parameters such as ?raw, ?import&raw, or ?import&url&inline. When the development server is exposed to the network and a sensitive file is inside server.fs.allow but matched by server.fs.deny, an unauthenticated attacker can append one of these queries and retrieve the denied file. This issue is fixed in version 6.4.5.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
