{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-49293","id":"CVE-2023-49293","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.tr","descriptionLong":"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.","published":"2023-12-04T23:03:30.752Z","updated":"2026-11-04T10:45:29.708790202Z","reserved":"2023-11-24T16:45:24.313Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["vitejs vite"],"affectedProducts":[{"vendor":"vitejs","product":"vite","defaultStatus":null,"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"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"vite","purl":"pkg:npm/vite","ranges":[">=4.4.0 <4.4.12",">=4.5.0 <4.5.1",">=5.0.0 <5.0.5"],"fixed":["4.4.12","4.5.1","5.0.5"],"advisory":"GHSA-92r3-m2mg-pj97"}],"cwes":["CWE-79"],"aliases":["GHSA-92r3-m2mg-pj97"],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/49xxx/CVE-2023-49293.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49293","tags":["advisory"]},{"url":"https://github.com/vitejs/vite","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00997,"epssPercentile":0.63375,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-49293","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49293","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-49293","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-92r3-m2mg-pj97","ok":true,"note":"GHSA-92r3-m2mg-pj97"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-49293","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}