{"id":"CVE-2026-112945","published":"2026-10-20T15:00:58Z","modified":"2026-10-28T14:11:03Z","title":"Vite: Cross origin script execution through Vite custom middleware","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"Vite is a frontend tooling framework for JavaScript. Prior to 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3, applications using custom middleware are vulnerable when they pass an unchanged browser request URL to server.transformIndexHtml. getHtmlFilename uses the query-bearing request URL to resolve an existing local file while preserving attacker-supplied leading slashes in the generated proxy module URL. If the transformed HTML contains an inline module script and a victim browser loads the crafted development-server page, the leading double slash makes the browser fetch and execute an attacker-controlled module in the Vite-served page. This execution can expose sensitive page data or permit critical actions available to the affected application. This issue is fixed in versions 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.1,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00637,"percentile":0.4505,"provenance":"source"},"cwes":[{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/pull/23653","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/7dafd8e56f152403a3230608fa4005273c2e9e17","tags":["x_refsource_MISC"]}],"priority":{"score":10.5,"factors":[{"name":"EPSS percentile","points":9.01},{"name":"CVSS severity","points":1.47}]},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":[">= 8.3.0, < 8.3.3",">= 8.2.0, < 8.2.4",">= 8.0.0, < 8.1.6",">= 7.0.0, < 7.3.7","< 6.4.4"]},{"vendor":"vitejs","product":"vite-plus","versions":["< 1.1.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-28T14:10:43.858513Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=8.3.0, <8.3.3",">=8.2.0, <8.2.4",">=8.0.0, <8.1.6",">=7.0.0, <7.3.7","<6.4.4"],"patched":["8.3.3","8.2.4","8.1.6","7.3.7","6.4.4"],"from":["GHSA-9jrq-w75r-8gcw"],"provenance":"source"},{"ecosystem":"npm","package":"vite-plus","vulnerableRanges":["<1.1.0"],"patched":["1.1.0"],"from":["GHSA-9jrq-w75r-8gcw"],"provenance":"source"}],"summary":{"text":"The flaw is a cross-origin script execution issue in Vite, a frontend tooling framework, affecting applications that use custom middleware and pass an unchanged browser request URL to server.transformIndexHtml. An attacker can craft a request whose leading double slash causes a victim's browser, while loading the page from the Vite development server, to fetch and execute an attacker-controlled module, which requires the victim to load the crafted page and the transformed HTML to contain an inline module script.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:51Z"},"euvd":{"id":"EUVD-2026-105125","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2025-58752","to":"CVE-2026-112945","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/indexHtml.ts"],"commits":["https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e","https://github.com/vitejs/vite/commit/7dafd8e56f152403a3230608fa4005273c2e9e17"],"basis":"rarely changed file"}]}]}}