Vulnerabilities/

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:

References

Related Issues

Tags:
npm
vite
Anything's wrong? Let us know Last updated on December 05, 2023

This issue is available in SmartScanner Professional

See Pricing