Skip to content
Fencer Vulns
medium 6.1

CVE-2023-49293 json

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

published 2023-12-04 2 y ago modified 2026-06-17 4 mo ago also GHSA-92r3-m2mg-pj97 , EUVD-2023-3168

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.0%
EPSS 1.0% chance of exploitation in 30 days, percentile 62%
public exploits
0
none known, plus a Nuclei check

Summary

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.

Patch / fix

  • npm vite 4.4.12, 4.5.1, 5.0.5

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-49293 updated cvss 6.1

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

  • Red Hat Build of Keycloak vitejs vitejs
    affected: workaround, no fix planned “Will not fix”
  • Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-agent-rhel8
    affected: workaround, no fix available
  • Red Hat Ansible Automation Platform 2 automation-controller, automation-eda-controller Red Hat JBoss Enterprise Application Platform 8 vitejs vitejs
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
17 mo ago

Exploit prediction

1.00% chance of exploitation in the next 30 days, higher than 62% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Nuclei template Vite dev server - Cross-Site Scripting nuclei detection template
  • github.com https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
npm vite
>=4.4.0, <4.4.12
>=4.5.0, <4.5.1
>=5.0.0, <5.0.5
4.4.12
4.5.1
5.0.5

Affected products

  • vitejs vite

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.