SECURITY & CVE TRACK RECORD
Vite Security Advisories, CVEs & Patched Versions
Historical vulnerability disclosures, CVSS severity ratings, affected version ranges, and verified patch releases for Vite.
### 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...
Vulnerable Range:
6.4.4 -> 6.4.5
### Summary
When accessing a malicious site while a dev server using Vite is running, that site was able to load scripts in a page served by the dev server.
### Impact
Only apps that match the following conditions are affected:
- the dev server passes an unchanged browser ...
Vulnerable Range:
8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4, 8.0.0 -> 8.1.6
### Summary
The content of files outside `server.fs` setting can be returned to the browser if the project imports a file path concatenated with the `root`. For example, if the project references `<path-to-project-root>/etc/hosts`, the content of `/etc/hosts` was possible to ...
Vulnerable Range:
8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4, 8.0.0 -> 8.1.6
### Summary
The first 4 bytes of files outside of `server.fs` setting can be returned to the browser by a request containing `?vite-wasm-instance`.
### Impact
Only apps that match one of the following conditions are affected:
- explicitly expose the Vite dev server to the...
Vulnerable Range:
8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4, 0.2.8 -> 1.1.0
launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors
### Summary
`launch-editor` forwarded file paths directly to editors without sanitization. If a path resembles a CLI flag, editors like Vim may interpret it as a command, potentially causing unintended file overwrites or command execution.
### Impact
#### Direct `launch-edi...
Vulnerable Range:
0 -> 2.14.2, 8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4
Fix Version:
2.14.2
launch-editor: `fs.existsSync()` existence check can be bypassed on Windows
### Summary
`launch-editor` checked `fs.existsSync(fileName)` before passing a supplied path to an editor command. On Windows, an attacker can bypass this check with a crafted path ending in `\\..:line:column`. This removes the requirement that the attacker be able to place a...
Vulnerable Range:
0 -> 2.14.2, 8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4
Fix Version:
2.14.2
launch-editor: escapeCmdArgs() omits % escaping on Windows
### Summary
`launch-editor` did not escape `%` on Windows when passing an argument to `cmd`. When an environment variable contained a malicious value, it was possible that that content to be executed.
### Impact
Only apps that match all of the following conditions are affec...
Vulnerable Range:
0 -> 2.14.2, 8.3.0 -> 8.3.3, 8.2.0 -> 8.2.4
Fix Version:
2.14.2
launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows
### Summary
The `launch-editor` NPM package accesses arbitrary paths including Windows UNC paths. When a UNC path is opened, Windows automatically attempts NTLM authentication to the remote host, causing the user’s NTLMv2 password hash to be leaked to an attacker-controlled SM...
Vulnerable Range:
0 -> 2.14.1, 8.0.0 -> 8.0.16, 7.0.0 -> 7.3.5
Fix Version:
2.14.1
### 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 on Windows.
### Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite...
Vulnerable Range:
8.0.0 -> 8.0.16, 7.0.0 -> 7.3.5, 0 -> 6.4.3
### Summary
Due to the insufficient sanitization of the `file` argument in the `launchEditor`, an attacker can execute arbitrary commands on Windows by supplying a filename that contains special characters.
### Impact
If the following conditions are met, an attacker can execu...
Vulnerable Range:
0 -> 2.9.0, 0 -> 5.4.9
### Summary
Any files ending with `.map` even out side the project can be returned to the browser.
### 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...
Vulnerable Range:
8.0.0 -> 8.0.5, 7.0.0 -> 7.3.2, 0 -> 6.4.2
### 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.
### Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server...
Vulnerable Range:
8.0.0 -> 8.0.5, 7.1.0 -> 7.3.2
### Summary
[`server.fs`](https://vite.dev/config/server-options#server-fs-strict) check was not enforced to the `fetchModule` method that is exposed in Vite dev server's WebSocket.
### Impact
Only apps that match the following conditions are affected:
- explicitly expose...
Vulnerable Range:
8.0.0 -> 8.0.5, 7.0.0 -> 7.3.2, 6.0.0 -> 6.4.2
### Summary
Files denied by [`server.fs.deny`](https://vitejs.dev/config/server-options.html#server-fs-deny) were sent if the URL ended with `\` when the dev server is running on Windows.
### Impact
Only apps that match the following conditions are affected:
- explicitly exp...
Vulnerable Range:
7.1.0 -> 7.1.11, 7.0.0 -> 7.0.8, 6.0.0 -> 6.4.1
### Summary
Files starting with the same name with the public directory were served bypassing the `server.fs` settings.
### Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or [`server.ho...
Vulnerable Range:
7.1.0 -> 7.1.5, 7.0.0 -> 7.0.7, 6.0.0 -> 6.3.6
### Summary
Any HTML files on the machine were served regardless of the `server.fs` settings.
### 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://...
Vulnerable Range:
7.1.0 -> 7.1.5, 7.0.0 -> 7.0.7, 6.0.0 -> 6.3.6
### Summary
The contents of files in [the project `root`](https://vite.dev/config/shared-options.html#root) that are denied by a file matching pattern can be returned to the browser.
### Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or...
Vulnerable Range:
6.3.0 -> 6.3.4, 6.2.0 -> 6.2.7, 6.0.0 -> 6.1.6
### Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
### Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or [server.host con...
Vulnerable Range:
6.2.0 -> 6.2.6, 6.1.0 -> 6.1.5, 6.0.0 -> 6.0.15
### Summary
The contents of arbitrary files can be returned to the browser.
### Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or [server.host config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.
##...
Vulnerable Range:
6.2.0 -> 6.2.5, 6.1.0 -> 6.1.4, 6.0.0 -> 6.0.14
### Summary
The contents of arbitrary files can be returned to the browser.
### Impact
Only apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.
...
Vulnerable Range:
6.2.0 -> 6.2.4, 6.1.0 -> 6.1.3, 6.0.0 -> 6.0.13
### Summary
The contents of arbitrary files can be returned to the browser.
### Impact
Only apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.
...
Vulnerable Range:
6.2.0 -> 6.2.3, 6.1.0 -> 6.1.2, 6.0.0 -> 6.0.12
### Summary
Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections.
> [!WARNING]
> This vulnerability even applies to users that only run...
Vulnerable Range:
6.0.0 -> 6.0.9, 5.0.0 -> 5.4.12, 0 -> 4.5.6
### Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to `cjs`/`iife`/`umd` output format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an...
Vulnerable Range:
5.4.0 -> 5.4.6, 5.3.0 -> 5.3.6, 5.2.0 -> 5.2.14
### Summary
The contents of arbitrary files can be returned to the browser.
### Details
`@fs` denies access to files outside of Vite serving allow list. Adding `?import&raw` to the URL bypasses this limitation and returns the file content if it exists.
### PoC
```sh
$ npm cr...
Vulnerable Range:
5.4.0 -> 5.4.6, 5.3.0 -> 5.3.6, 5.2.0 -> 5.2.14
### Summary
[Vite dev server option](https://vitejs.dev/config/server-options.html#server-fs-deny) `server.fs.deny` did not deny requests for patterns with directories. An example of such a pattern is `/foo/**/*`.
### Impact
Only apps setting a custom `server.fs.deny` that in...
Vulnerable Range:
2.7.0 -> 2.9.18, 3.0.0 -> 3.2.10, 4.0.0 -> 4.5.3
### Summary
[Vite dev server option](https://vitejs.dev/config/server-options.html#server-fs-deny) `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.
This bypass is simi...
Vulnerable Range:
2.7.0 -> 2.9.17, 3.0.0 -> 3.2.8, 4.0.0 -> 4.5.2
### Summary
When Vite's HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`<script type="module">...</script>`), it is possible to inject a...
Vulnerable Range:
4.4.0 -> 4.4.12, 4.5.0 -> 4.5.1, 5.0.0 -> 5.0.5
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.
### Steps to Fix. **Upd...
Vulnerable Range:
0 -> 2.9.16, 3.0.2 -> 3.2.7, 4.0.0 -> 4.0.5
Vite before v2.9.13 was discovered to allow attackers to perform a directory traversal via a crafted URL to the victim's service.
Vulnerable Range:
0 -> 2.9.13, 3.0.0-alpha.0 -> 3.0.0-beta.4