CVE-2023-49293
published 2023-12-04CVE-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…
PriorityP338medium6.1CVSS 3.1
AVNACLPRNUIRSCCLILAN
EXPLOIT
EPSS
1.00%
58.3th percentile
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 (`...`), 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.
Affected
9 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | — | — |
| vitejs | vite | >= 4.4.0 < 4.4.12 | 4.4.12 |
| vitejs | vite | 4.4.0 – 4.4.11 | — |
| vitejs | vite | >= 4.5.0 < 4.5.1 | 4.5.1 |
| vitejs | vite | >= 5.0.0 < 5.0.5 | 5.0.5 |
| vitejs | vite | 5.0.0 – 5.0.4 | — |
CVSS provenance
nvdv3.16.1MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vendor_redhat6.1MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
osv·2023-12-05
CVE-2023-49293 [MEDIUM] Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
### Summary
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 (`...`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`.
### Impact
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.
### Patches
Fixed in [email protected], [email protected], [email protected]
### Details
Suppos
GHSA
Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
ghsa·2023-12-05
CVE-2023-49293 [MEDIUM] CWE-79 Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
### Summary
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 (`...`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`.
### Impact
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.
### Patches
Fixed in [email protected], [email protected], [email protected]
### Details
Suppos
Red Hat
vitejs: XSS vulnerability in `server.transformIndexHtml` via URL payload
vendor_redhat·2023-12-05·CVSS 6.1
CVE-2023-49293 [MEDIUM] CWE-79 vitejs: XSS vulnerability in `server.transformIndexHtml` via URL payload
vitejs: XSS vulnerability in `server.transformIndexHtml` via URL payload
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 (`...`), 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
No detection rules found.
Nuclei
Vite dev server - Cross-Site Scripting
nuclei·CVSS 6.1
CVE-2023-49293 [MEDIUM] Vite dev server - Cross-Site Scripting
Vite dev server - Cross-Site Scripting
Vite's dev server, when used with `appType: 'custom'` and manually invoking `server.transformIndexHtml` using the unmodified request URL, is vulnerable to XSS via a crafted URL payload. If the HTML being served includes an inline module script (`...`), an attacker can inject a script via the URL, potentially leading to XSS in the browser. The vulnerability only affects certain custom SSR/dev configurations, not plain `vite dev`.
Template:
id: CVE-2023-49293
info:
name: Vite dev server - Cross-Site Scripting
author: ritikchaddha
severity: medium
description: |
Vite's dev server, when used with `appType: 'custom'` and manually invoking `server.transformIndexHtml` using the unmodified request URL, is vulnerable to XSS via a crafted URL payload. If th
2023-12-04
Published