Loading advisory.
Loading advisory.
Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.
Published 2023-06-01 16:29 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| vite | npm | < 2.9.16 >= 3.0.2, < 3.2.7 >= 4.0.0, < 4.0.5 >= 4.1.0, < 4.1.5 >= 4.2.0, < 4.2.3 >= 4.3.0, < 4.3.9 | 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, 4.3.9 | npm install vite@2.9.16npm install vite@3.2.7npm install vite@4.0.5npm install vite@4.1.5npm install vite@4.2.3npm install vite@4.3.9 |
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.
vite.config.js file, review and update the server configuration options to restrict access to unauthorized requests or directories.Only users explicitly exposing the Vite dev server to the network (using --host or the server.host config option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g: //.env, //.env.local)\n4. The server option fs.deny was successfully bypassed.
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.032 on 2026-11-24 to 0.029 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.032 | first score | v2026.06.15 |
| 2026-11-26 | 0.029 | 0.032 | v2026.06.15 |