Cross-site scriptingin vitejs vite.
Weaponized: a Nuclei exploit is public.
Vite is a website frontend framework. When Vite's HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`<script type="module">...</script>`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: 'custom'` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.
- Upgrade vite (npm) to 4.4.12, 4.5.1, 5.0.5 or later, whichever matches your release line.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 24 Nov 2023CVE ID reserved by GitHub_M.
- 4 Dec 2023Published in the CVE List.
- 29 May 2025CVE record last updated.
Attack code anyone can find
Exploit maturity: Weaponized (Nuclei). CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Other vite vulnerabilities
Same weakness: Cross-site scripting
- github.com x_refsource_CONFIRM
Patchminder. CVE-2023-49293: Cross-site scripting in vitejs vite. https://patchminder.com/cve/cve-2023-49293/ (accessed 5 December 2026).