What’s Vulnerable › Vulnerabilities
CVE-2026-112945: Vite: Cross origin script execution through Vite custom middleware
- Severity: low (CVSS 2.1 v4.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-10-20 · updated 2026-10-28
- Weakness: CWE-80
Description
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.
Affected products
- Npm Vite: from 8.3.0 before 8.3.3; from 8.2.0 before 8.2.4; from 8.0.0 before 8.1.6; from 7.0.0 before 7.3.7; before 6.4.4 — fixed in 8.3.3, 8.2.4, 8.1.6, 7.3.7, 6.4.4
- Npm Vite-Plus: before 1.1.0 — fixed in 1.1.0
- vitejs vite: from 8.3.0, < 8.3.3; from 8.2.0, < 8.2.4; from 8.0.0, < 8.1.6; from 7.0.0, < 7.3.7; before 6.4.4
- vitejs vite-plus: before 1.1.0
How to fix
Upgrade to a fixed version: Npm Vite 8.3.3, 8.2.4, 8.1.6, 7.3.7; Npm Vite-Plus 1.1.0. Check the vendor advisory for mitigations.
References
- https://github.com/vitejs/vite/commit/7dafd8e56f152403a3230608fa4005273c2e9e17
- https://github.com/vitejs/vite/pull/23653
- https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw
- https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw
Get alerted when CVE-2026-112945 or the next vulnerability affects your stack