Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 8.0.5, 7.3.2, 6.4.2, 0.1.16
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 3 proofs of concept on GitHub, 1 Nuclei template
- Exploitation: poc
- Automatable: yes
- Technical impact: partial
Summary
Vite is a frontend tooling framework for JavaScript. From 6.0.0 to before 6.4.2, 7.3.2, and 8.0.5, if it is possible to connect to the Vite dev server’s WebSocket without an Origin header, an attacker can invoke fetchModule via the custom WebSocket event vite:invoke and combine file://... with ?raw (or ?inline) to retrieve the contents of arbitrary files on the server as a JavaScript string (e.g., export default "..."). The access control enforced in the HTTP request path (such as server.fs.allow) is not applied to this WebSocket-based execution path. This vulnerability is fixed in 6.4.2, 7.3.2, and 8.0.5.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- vitejs vite
From 8.0.0 · fixed in 8.0.5; From 7.0.0 · fixed in 7.3.2; From 6.0.0 · fixed in 6.4.2
- vitejs vite-plus
fixed in 0.1.16
- vitenpm
From 8.0.0 · fixed in 8.0.5
- vitenpm
From 7.0.0 · fixed in 7.3.2
- vitenpm
From 6.0.0 · fixed in 6.4.2