Websites were able to send any requests to the development server and read the response in vite (CVE-2025-24010)
Vite development server versions from 2.5.1 up to but not including 6.0.9 have a vulnerability that allows any website to send requests to the dev server and read responses due to permissive default CORS settings and lack of Origin header validation on WebSocket connections. This affects even local-only dev server instances. The vulnerability can lead to unauthorized reading of development server resources via cross-origin requests and WebSocket hijacking. A fix is available in newer versions of Vite. Mitigations include configuring CORS to restrict origins, setting allowed hosts when using reverse proxies or non-localhost domains, and using Chrome 94+ or HTTPS to mitigate Host header validation issues.
AI Analysis
Technical Summary
Vite's development server versions >=2.5.1 and <6.0.9 have a security flaw where the default CORS configuration allows any origin to fetch resources, and the WebSocket server does not validate the Origin header, enabling Cross-Site WebSocket Hijacking (CSWSH). This combination permits malicious websites to send arbitrary requests to the dev server and read responses, including local-only servers not exposed to the network. The vulnerability arises from three main issues: permissive CORS defaulting to Access-Control-Allow-Origin: *, lack of Origin header validation on WebSocket connections, and lack of Host header validation on HTTP requests. The vendor has released patches addressing these issues and introduced configuration options such as server.cors.origin and server.allowedHosts to restrict access. Users employing backend integration, reverse proxies, or accessing the server via non-localhost domains must adjust configurations accordingly. No mitigations exist for WebSocket Origin validation except upgrading. Using Chrome 94+ or HTTPS helps mitigate Host header issues.
Potential Impact
The vulnerability allows attackers to bypass same-origin policy restrictions on the Vite development server, enabling them to fetch and read resources served by the dev server from any origin. This can lead to unauthorized disclosure of development files and information. Additionally, the lack of Origin validation on WebSocket connections enables attackers to hijack WebSocket sessions, potentially reading and writing messages related to hot module replacement and error reporting. The impact is limited to confidentiality as integrity and availability are not affected. The vulnerability affects even local-only dev servers that are not exposed to the network, increasing the risk for developers running Vite locally.
Mitigation Recommendations
A fix is available in Vite versions 6.0.9 and later. Users should upgrade to a patched version to fully mitigate the vulnerability. For those unable to upgrade immediately, mitigations include setting server.cors to false or restricting server.cors.origin to trusted origins to address permissive CORS settings. When using backend integration, configure server.cors.origin explicitly to trusted backend origins. If using a reverse proxy or accessing the dev server via domains other than localhost or *.localhost, add those hostnames to server.allowedHosts. For WebSocket Origin header validation issues, no mitigations exist other than upgrading. Using Chrome 94+ or HTTPS for the development server helps mitigate Host header validation issues. Users relying on plugins or frameworks that connect to the WebSocket server independently may need to adjust plugin code or use the legacy.skipWebSocketTokenCheck option with awareness of security implications.
Websites were able to send any requests to the development server and read the response in vite (CVE-2025-24010)
Description
Vite development server versions from 2.5.1 up to but not including 6.0.9 have a vulnerability that allows any website to send requests to the dev server and read responses due to permissive default CORS settings and lack of Origin header validation on WebSocket connections. This affects even local-only dev server instances. The vulnerability can lead to unauthorized reading of development server resources via cross-origin requests and WebSocket hijacking. A fix is available in newer versions of Vite. Mitigations include configuring CORS to restrict origins, setting allowed hosts when using reverse proxies or non-localhost domains, and using Chrome 94+ or HTTPS to mitigate Host header validation issues.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Vite's development server versions >=2.5.1 and <6.0.9 have a security flaw where the default CORS configuration allows any origin to fetch resources, and the WebSocket server does not validate the Origin header, enabling Cross-Site WebSocket Hijacking (CSWSH). This combination permits malicious websites to send arbitrary requests to the dev server and read responses, including local-only servers not exposed to the network. The vulnerability arises from three main issues: permissive CORS defaulting to Access-Control-Allow-Origin: *, lack of Origin header validation on WebSocket connections, and lack of Host header validation on HTTP requests. The vendor has released patches addressing these issues and introduced configuration options such as server.cors.origin and server.allowedHosts to restrict access. Users employing backend integration, reverse proxies, or accessing the server via non-localhost domains must adjust configurations accordingly. No mitigations exist for WebSocket Origin validation except upgrading. Using Chrome 94+ or HTTPS helps mitigate Host header issues.
Potential Impact
The vulnerability allows attackers to bypass same-origin policy restrictions on the Vite development server, enabling them to fetch and read resources served by the dev server from any origin. This can lead to unauthorized disclosure of development files and information. Additionally, the lack of Origin validation on WebSocket connections enables attackers to hijack WebSocket sessions, potentially reading and writing messages related to hot module replacement and error reporting. The impact is limited to confidentiality as integrity and availability are not affected. The vulnerability affects even local-only dev servers that are not exposed to the network, increasing the risk for developers running Vite locally.
Mitigation Recommendations
A fix is available in Vite versions 6.0.9 and later. Users should upgrade to a patched version to fully mitigate the vulnerability. For those unable to upgrade immediately, mitigations include setting server.cors to false or restricting server.cors.origin to trusted origins to address permissive CORS settings. When using backend integration, configure server.cors.origin explicitly to trusted backend origins. If using a reverse proxy or accessing the dev server via domains other than localhost or *.localhost, add those hostnames to server.allowedHosts. For WebSocket Origin header validation issues, no mitigations exist other than upgrading. Using Chrome 94+ or HTTPS for the development server helps mitigate Host header validation issues. Users relying on plugins or frameworks that connect to the WebSocket server independently may need to adjust plugin code or use the legacy.skipWebSocketTokenCheck option with awareness of security implications.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-vite-CVE-2025-24010
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6abb419cf7a7c54106cc3878
Added to database: 09/29/2026, 04:42:04 UTC
Last enriched: 09/29/2026, 04:54:39 UTC
Last updated: 09/29/2026, 18:11:14 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.