Vite dev server - Cross-Site Scripting
CVE-2023-49293
Verified
Description
Vite's dev server, when used with `appType: 'custom'` and manually invoking `server.transformIndexHtml` using the unmodified request URL, is vulnerable to XSS via a crafted URL payload. If the HTML being served includes an inline module script (`<script type="module">...</script>`), an attacker can inject a script via the URL, potentially leading to XSS in the browser. The vulnerability only affects certain custom SSR/dev configurations, not plain `vite dev`.
Severity
Medium
CVSS Score
6.1
Exploit Probability
1%
Published Date
March 26, 2026
Template Author
ritikchaddha
CVE-2023-49293.yaml
6.1Score
CVSS Metrics
CVSS Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVE ID:
cve-2023-49293
CWE ID:
cwe-80
Remediation Steps
Update to vite@5.0.5, vite@4.5.1, or vite@4.4.12.