Skip to content
CVE Tracker
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2023-49293

Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite

Medium6.1EPSS 1.00%
Published
Updated
Reserved
Assigned by
GitHub_M

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.

Scores

CVSS scores of CVE-2023-49293, by who scored it
Scored byCVSSScoreVector
GitHub_MCNA (assigner)3.1Medium6.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVDNVD · Modified3.1Medium6.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS (exploitation in 30 days)
1.00% · top 37% of all CVEs (6 Nov 2026)
CISA SSVC
Exploitation: none · Automatable: no · Technical impact: partial
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.1.

Weakness

Affected products

  • vitejs · vite

    • affected >=4.4.0, < 4.4.12
    • affected = 4.5.0
    • affected >=5.0.0, < 5.0.5

Affected packages

From reviewed advisories of the GitHub Advisory Database.

References (1)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2023-49293 badge
[![CVE-2023-49293](https://trackcve.app/badge/CVE-2023-49293.svg)](https://trackcve.app/cve/CVE-2023-49293)

Record last updated .