CVE-2023-49293: vitejs vite Cross-site Scripting
Vulnerability summary
CVE-2023-49293 is a medium (CVSS 6.1) Cross-site Scripting vulnerability in vitejs vite. EPSS estimates a 1.00% chance of exploitation in the next 30 days, higher than 62.1% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 04-12-2023PublishedVulnerability first disclosed.
- 29-05-2025Last modifiedVulnerability information updated.
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 metrics
3 scores · 3 sources · 1 version- OSV · NpmEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
1.00%
Chance of exploitation in the next 30 days
Percentile
62%
Versus all other CVEs
30-day change
0.00 pp
From 1.00% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundVite
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Npm1 product
- vite≥ 4.4.0, < 4.4.12 | ≥ 4.5.0, < 4.5.1 | ≥ 5.0.0, < 5.0.5
Vitejs1 product
- vite≥ 4.4.0, < 4.4.12 | = 4.5.0 | ≥ 5.0.0, < 5.0.5 | ≥ 4.4.0, ≤ 4.4.11 | ≥ 5.0.0, ≤ 5.0.4 | 5.0.0 | 5.0.0:beta0 | 5.0.0:beta1 | 5.0.0:beta10 | 5.0.0:beta11 | 5.0.0:beta12 | 5.0.0:beta13 | 5.0.0:beta14 | 5.0.0:beta15 | 5.0.0:beta16 | 5.0.0:beta17 | 5.0.0:beta18 | 5.0.0:beta19 | 5.0.0:beta2 | 5.0.0:beta20 | 5.0.0:beta3 | 5.0.0:beta4 | 5.0.0:beta5 | 5.0.0:beta6 | 5.0.0:beta7 | 5.0.0:beta8 | 5.0.0:beta9
2 vendors · 2 products
References
3 links- github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97X Refsource CONFIRMWEBExploitThird Party Advisory
- github.com/vitejs/vitePACKAGE