Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
- Severity:
- Medium
Description
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.
Recommendation
Update the vite package to the latest compatible version. Followings are version details:
Affected version(s): **>= 5.0.0, < 5.0.5 = 4.5.0 >= 4.4.0, < 4.4.12** Patched version(s): **5.0.5 4.5.1 4.4.12**
References
Related Issues
- Parse Server has a Cross-Site Scripting (XSS) vulnerability via Unescaped Mustache Template Variables - CVE-2025-68115
- google-translate-api-browser Server-Side Request Forgery (SSRF) Vulnerability - CVE-2023-48711
- Parse Server vulnerable to stored XSS via file upload of HTML-renderable file types - CVE-2026-31868
- FUXA SQL Injection vulnerability - fuxa-server - CVE-2023-31719
You might also like:
- Tags:
- npm
- vite
Anything's wrong? Let us know Last updated on December 05, 2023


