> CVE-2024-45812 [MEDIUM]

« BACK_TO_HOME
PUBLISHED
2024-09-17 20:15
MODIFIED
2024-09-20 12:30
CVSS_SCORE V3
6.4
EPSS (Prob. Exploit)
0.64%
Top 50.1%
DATA SOURCES:
NVD 🔗 2025-10-18 CVE PROJECT 🔗 2026-01-19 FIRST EPSS 🔗 2026-10-25 GITHUB 🔗 2026-11-11

> DESCRIPTION

Vite a frontend build tooling framework for javascript. Affected versions of vite were discovered to contain a DOM Clobbering vulnerability when building scripts to `cjs`/`iife`/`umd` output format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present. DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to `cjs`, `iife`, or `umd`. In such cases, Vite replaces relative paths starting with `__VITE_ASSET__` using the URL retrieved from `document.currentScript`. However, this implementation is vulnerable to a DOM Clobbering attack. The `document.currentScript` lookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server. This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of `cjs`, `iife`, or `umd`) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.

> AFFECTED_PRODUCTS

ℹ️ Aucun produit affecté n'a encore été publié par NVD pour cette CVE.

> CVSS V3 METRICS

CVSS_VECTOR
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H

> MÉTRIQUES CVSS DÉTAILLÉES

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
Métrique Valeur Interprétation
AV (Vecteur d'Attaque)
Attack Vector
Network (N)
Exploit possible à distance via réseau (HTTP, API, etc.)
AC (Complexité d'Attaque)
Attack Complexity
High (H)
Conditions spécifiques doivent être réunies pour exploiter
PR (Privilèges Requis)
Privileges Required
Low (L)
Authentifié avec compte utilisateur basique
UI (Interaction Utilisateur)
User Interaction
None (N)
Aucune interaction utilisateur nécessaire
S (Périmètre)
Scope
Unchanged (U)
Impact reste dans le périmètre du composant compromis
C (Impact Confidentialité)
Confidentiality Impact
Low (L)
Divulgation limitée d'informations
I (Impact Intégrité)
Integrity Impact
Low (L)
Modification limitée des données possible
A (Impact Disponibilité)
Availability Impact
High (H)
Interruption totale du service possible

> RÉSUMÉ DES IMPACTS

Confidentialité
Low
Divulgation limitée d'informations
Intégrité
Low
Modification limitée des données possible
Disponibilité
High
Interruption totale du service possible

> RED HAT SECURITY ADVISORIES

Red Hat Security Advisory: Red Hat OpenShift distributed tracing platform (Jaeger) 3.4 release
A new version of Red Hat OpenShift distributed tracing platform (Jaeger) has been released
Red Hat Security Advisory: Red Hat OpenShift distributed tracing platform (Jaeger) 3.4 release
A new version of Red Hat OpenShift distributed tracing platform (Jaeger) has been released

> GITHUB SECURITY ADVISORY

GHSA-64vr-g452-qvp3 MODERATE

Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS

AFFECTED PACKAGES:
NPM / vite
>= 5.0.0, < 5.1.8
Fixed in: 5.1.8
NPM / vite
< 3.2.11
Fixed in: 3.2.11
NPM / vite
>= 5.2.0, < 5.2.14
Fixed in: 5.2.14
NPM / vite
>= 5.3.0, < 5.3.6
Fixed in: 5.3.6
NPM / vite
>= 5.4.0, < 5.4.6
Fixed in: 5.4.6
NPM / vite
>= 4.0.0, < 4.5.4
Fixed in: 4.5.4

> HISTORIQUE DES MODIFICATIONS

Première apparition
17/09/2024 20:15
Source: NVD
📊 ENRICHISSEMENT 18/10/2025 14:54
CVEPROJECT
Champ modifié: CVE Project
Ancienne valeur:
Non
Nouvelle valeur:
Oui
Total des modifications: 1 Dernière mise à jour: 1 year ago
« BACK_TO_HOME