Vite v5 Security Update Patches Critical File Exposure Flaw (CVE-2025-58752)
A critical security vulnerability in the Vite development server has been patched, requiring immediate attention from developers. The flaw, tracked as CVE-2025-58752, could allow unauthorized access to any HTML file on the host machine, bypassing the server's configured file system restrictions. This exposure risk is not theoretical; it directly impacts any application where the Vite dev server is explicitly exposed to the network, creating a potential vector for data exfiltration or further system compromise.
The vulnerability was present in versions prior to Vite 5.4.20. The automated dependency update PR highlights a major version jump from ^4.0.0 to ^5.4.20, underscoring the severity and the breadth of the fix required. The advisory from the Vite team indicates the issue was specific to the development server's behavior, where its file-serving logic failed to properly respect the `server.fs` security settings, a critical misconfiguration for a tool often used in local and CI/CD environments.
For development teams, this is a high-priority operational security patch. The conditions for exploitation are narrow but dangerous: an app must have its Vite dev server network-accessible. However, in modern cloud-based or containerized development setups, this configuration is not uncommon. Failure to apply this update leaves development and build environments vulnerable to attackers who could probe exposed servers to access sensitive HTML files, which may contain configuration data, tokens, or other build artifacts. The update is now available via standard package managers.