{"id":"CVE-2023-49293","state":"PUBLISHED","title":"Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite","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.","publishedAt":"2023-12-04T23:03:30.752Z","updatedAt":"2025-05-29T13:40:53.278Z","severity":{"score":6.1,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["vitejs vite"],"affected":[{"vendor":"vitejs","product":"vite","versions":[{"version":">=4.4.0, < 4.4.12","status":"affected"},{"version":"= 4.5.0","status":"affected"},{"version":">=5.0.0, < 5.0.5","status":"affected"}]}],"references":["https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:06:24.729Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/49xxx/CVE-2023-49293.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-49293","state":"PUBLISHED","datePublished":"2023-12-04T23:03:30.752Z","dateUpdated":"2025-05-29T13:40:53.278Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2023-11-24T16:45:24.313Z"},"containers":{"cna":{"title":"Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"vitejs","product":"vite","versions":[{"version":">=4.4.0, < 4.4.12","status":"affected"},{"version":"= 4.5.0","status":"affected"},{"version":">=5.0.0, < 5.0.5","status":"affected"}]}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","name":"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2023-12-04T23:03:30.752Z"},"source":{"advisory":"GHSA-92r3-m2mg-pj97","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","name":"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","tags":["x_refsource_CONFIRM","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T21:53:44.657Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-05-29T13:40:33.559187Z","id":"CVE-2023-49293","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-05-29T13:40:53.278Z"}}]}}}