# CVE-2023-49293: Cross-site Scripting in \`server.transformIndexHtml\` via URL payload in vite

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-12-04 · Modified: 2025-05-29
- Aliases: GHSA-92r3-m2mg-pj97
- Record: https://cvemate.com/vulnerability/CVE-2023-49293 · JSON: https://cvemate.com/vulnerability/CVE-2023-49293/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.997%, percentile 63.854%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- Npm vite (Npm): ≥ 4.4.0, \< 4.4.12 \| ≥ 4.5.0, \< 4.5.1 \| ≥ 5.0.0, \< 5.0.5
- vitejs 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

## References

- <https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-49293>
- <https://github.com/vitejs/vite>

---

Data as of 2026-12-05T10:17:58.343Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
