Medium severity · published Dec 4, 2023
CVE-2023-49293
Vite is a website frontend framework
6.1
CVSS
1%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)1.0% · higher than 63% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VI
Vite · Vitejs
4.4.0 through 4.4.11; 5.0.0 through 5.0.4; 5.0.0; 5.0.0; 5.0.0; 5.0.0; +18 more · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-49293
CVE.org
https://www.cve.org/CVERecord?id=CVE-2023-49293
Exploit
https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97
More from Vite
7.5
CVE-2025-31125
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
8.3
CVE-2024-52011
launch-editor vulnerable to command injection via the crafted request on Windows
7.5
CVE-2026-112942
launch-editor: `fs.existsSync()` existence check can be bypassed on Windows
7.5
CVE-2026-53571
Vite: `server.fs.deny` bypass on Windows alternate paths
7.5
CVE-2026-39364
Vite has a `server.fs.deny` bypass with queries
