6.1

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

Modified
AliasesGHSA-92r3-m2mg-pj97
Published 04-12-2023Last modified 29-05-2025

Vulnerability summary

CVE-2023-49293 is a medium (CVSS 6.1) vulnerability in vitejs vite. EPSS estimates a 1.00% chance of exploitation in the next 30 days, higher than 63.8% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.1/10
010
Medium · v3.1 (CVE.org)
EPSS score
1.00%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Timeline

  1. 04-12-2023
    PublishedVulnerability first disclosed.
  2. 29-05-2025
    Last modifiedVulnerability information updated.

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 [email protected], [email protected], and [email protected]. There are no known workarounds for this vulnerability.

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

1.00%

Chance of exploitation in the next 30 days

Percentile

64%

Versus all other CVEs

30-day change

No change 0.00 pp

From 1.00% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Vite

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Npm1 product
  • vite≥ 4.4.0, < 4.4.12 | ≥ 4.5.0, < 4.5.1 | ≥ 5.0.0, < 5.0.5
Vitejs1 product
  • 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

2 vendors · 2 products

References

3 links