Vite Development Server Exposed: CVE-2025-24010 Allows Cross-Origin Attacks
A critical security flaw in the Vite development server, tracked as CVE-2025-24010, exposes projects to cross-origin attacks. The vulnerability stems from default CORS settings and a lack of validation on the Origin header for WebSocket connections. This combination allows any malicious website to send requests to a developer's local Vite server and read the responses, potentially exposing sensitive project data, API keys, or internal application state during development.
The issue is present in versions prior to Vite 5.4.21. The GitHub security advisory (GHSA-vg6x-rcgg-rjx6) details that the flaw enables unauthorized cross-origin communication. This is not a theoretical risk; it is a practical attack vector where an attacker could lure a developer to a malicious site, which then silently probes and interacts with the developer's locally running Vite instance. The automated dependency update pull request highlights the urgency, jumping from version 5.2.9 to the patched 5.4.21.
For development teams, this vulnerability represents a direct pipeline risk. Unpatched local development environments become endpoints accessible from the broader web, bypassing standard network isolation assumptions. The immediate pressure is on organizations to mandate updates across all projects and CI/CD pipelines. While the fix is available, the lag in applying it leaves a window where active development work could be compromised, emphasizing the need for robust dependency management and prompt security patching protocols.