Skip to main content
MEDIUM

CVE-2023-49293

CVSS v3

6.1

MEDIUM

EPSS Score

1.0 %

exploit probability, as of 2026-10-19

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for vite.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • vitenpmfrom 5.0.0 · fixed in 5.0.5

Vendor advisories

  • CVE-2023-49293 Red Hat Product Security2 known affected

    vitejs: XSS vulnerability in `server.transformIndexHtml` via URL payload

    vitejs as a component of Red Hat Build of Keycloak · rhosdt/jaeger-agent-rhel8 as a component of Red Hat OpenShift distributed tracing 2

Full record on NVD

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.

Technical details

Published
2023-12-04

Frequently asked questions

What is CVE-2023-49293?

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.

Is CVE-2023-49293 actively exploited?

Active exploitation of CVE-2023-49293 has not been confirmed. Its EPSS score was 1.0% on 2026-10-19, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2023-49293?

CVE-2023-49293 has a CVSS v3 base score of 6.1 (MEDIUM severity).

Running vite? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month