{"cve":"CVE-2023-49293","nvd":{"published":"2023-12-04T23:15:27.730","modified":"2026-06-17T06:35:47.193","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97"],"products":["vitejs:vite"],"source":"nvd","synced_at":"2026-10-19T21:42:34.585441961+00:00"},"epss":{"cve":"CVE-2023-49293","score":0.00997,"percentile":0.62721,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-92r3-m2mg-pj97","url":"https://osv.dev/vulnerability/GHSA-92r3-m2mg-pj97","summary":"Vite XSS vulnerability in `server.transformIndexHtml` via URL payload","modified":"2023-12-06T00:11:36.913866Z","packages":[{"ecosystem":"npm","name":"vite","purl":"pkg:npm/vite","ranges":[">=4.4.0 <4.4.12"],"fixed":["4.4.12"]},{"ecosystem":"npm","name":"vite","purl":"pkg:npm/vite","ranges":[">=4.5.0 <4.5.1"],"fixed":["4.5.1"]},{"ecosystem":"npm","name":"vite","purl":"pkg:npm/vite","ranges":[">=5.0.0 <5.0.5"],"fixed":["5.0.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}