Record summary

CVE-2023-49293 has a selected CVSS score of 6.1 (medium); EIP currently links 1 Nuclei template.

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.

Description source: CVE List

Exploitation context

Available material

Nuclei templates
1

CISA SSVC decision

ExploitationNone
AutomatableNo
Technical impactPartial

CISA Coordinator · SSVC 2.0.3 · Evaluated May 29, 2025 · Source: CVE List

Affected products and versions

2
ProductSourceVersion rangeStatus
CVE List>=4.4.0, < 4.4.12affected
= 4.5.0affected
>=5.0.0, < 5.0.5affected
GitHub Advisory4.4.0 to < 4.4.12 · Fixed in 4.4.12affected
4.5.0affected
4.5.0 to < 4.5.1 · Fixed in 4.5.1affected
5.0.0 to < 5.0.5 · Fixed in 5.0.5affected

Nuclei templates

1
ProjectDiscoveryMEDIUMVite dev server - Cross-Site ScriptingCVSS 6.1

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

Impact

Attackers can inject malicious HTML into the page, potentially leading to cross-site scripting or other client-side attacks.

Remediation

Update to vite@5.0.5, vite@4.5.1, or vite@4.4.12.

WeaknessesCWE-80
Authorsritikchaddha
Template tagscvecve2023vitexss
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Shodan: http.html:"/@vite/client"
FOFA: body="/@vite/client"

Source: ProjectDiscovery

References

3