CVE-2023-49293 json
Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite
published 2y ago modified 28d ago also EUVD-2023-3168 , GHSA-92r3-m2mg-pj97
- 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 63%
- public exploits
- 0
- none known
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
Is CVE-2023-49293 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor 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 vitejsaffected: workaround, no fix planned “Will not fix”
-
Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-agent-rhel8affected: workaround, no fix available
-
Red Hat Ansible Automation Platform 2 automation-controller, automation-eda-controller Red Hat JBoss Enterprise Application Platform 8 vitejs vitejsnot 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
- last yr.
Exploit prediction
1.00% chance of exploitation in the next 30 days, higher than 63% of all scored CVEs (FIRST EPSS, 2026-11-15).
Exploits and checks
- 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 |
| GitHub | 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 |
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
-
github.com
/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97
web, exploit, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-49293
advisory
-
github.com
/vitejs/vite
package
Sources
- CVE List CVE-2023-49293
- GitHub Advisory GHSA-92r3-m2mg-pj97
- NVD CVE-2023-49293
- Maintainer advisory GHSA-92r3-m2mg-pj97
Fencer Intel 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.
The maintainers of vitejs/vite published their own advisory on GitHub. Reviewed sources take precedence over it.