patchminder
Weaponized · Nuclei CVE-2023-49293

Cross-site scriptingin vitejs vite.

Published 4 Dec 2023 · Updated 29 May 2025 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Weaponized: a Nuclei exploit is public.

Attack code is public
Severity
Medium 6.1
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1 · no login needed
Attack likelihood
Low
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 1.0% chance in 30 days · 4 Dec 2026
Fix
Available
Fixed in 4.4.12, 4.5.1, 5.0.5
In plain words

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.

What to do now
  • Upgrade vite (npm) to 4.4.12, 4.5.1, 5.0.5 or later, whichever matches your release line.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
vite
Not confirmed
Not confirmed
CVE record
vite (npm)
4.4.0 to before 4.4.12
4.4.12
GitHub advisory
vite (npm)
4.5.0 to before 4.5.1
4.5.1
GitHub advisory
vite (npm)
5.0.0 to before 5.0.5
5.0.5
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 24 Nov 2023
    CVE ID reserved by GitHub_M.
  2. 4 Dec 2023
    Published in the CVE List.
  3. 29 May 2025
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Weaponized (Nuclei). CISA assessment (SSVC): exploitation none.

Metasploit module
None known
Nuclei scan template
Available
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other vite vulnerabilities

Same weakness: Cross-site scripting

All CWE-79 vulnerabilities

References
Cite this page

Patchminder. CVE-2023-49293: Cross-site scripting in vitejs vite. https://patchminder.com/cve/cve-2023-49293/ (accessed 5 December 2026).