CVE-2024-45812 in Element products
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-...
Affects 1 product from 7 vendors. Facts below cite their sources.
Remotely exploitable over the network, high complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Element | — | — |
| Javascript | — | — |
| Lookup | — | — |
| Relative | — | — |
| Script | — | — |
| Scripts | — | — |
| Vitejs | Vite | < 3.2.11 ≥ 4.0.0, < 4.5.5 ≥ 5.0.0, < 5.2.14 ≥ 5.3.0, < 5.3.6 ≥ 5.4.0, < 5.4.6 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-45812 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-213745-M |
| CVSS vector | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H |
| Published | 2024-09-17 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-79: Cross-Site Scripting (XSS)
Attacker injects malicious scripts into web pages viewed by other users, executing in the victim's browser context.
Related attack patterns (CAPEC)
CAPEC-85 AJAX Footprinting via CWE-79
CAPEC-209 XSS Using MIME Type Mismatch via CWE-79
CAPEC-588 DOM-Based XSS via CWE-79
CAPEC-591 Reflected XSS via CWE-79
CAPEC-592 Stored XSS via CWE-79
Show all 6
CAPEC-63 Cross-Site Scripting (XSS) via CWE-79
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A medium severity vulnerability affects Element systems (CVE-2024-45812). No public exploit code is currently available. Review vendor advisories and apply patches during the next maintenance window.
Vulnerability details: 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 no CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H.
Questions
What is CVE-2024-45812?
A medium severity vulnerability affects Element systems (CVE-2024-45812). No public exploit code is currently available. Review vendor advisories and apply patches during the next maintenance window.
What is the CVSS score for CVE-2024-45812?
CVE-2024-45812 has CVSS 6.4 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H. EPSS: 0.9%.
Is CVE-2024-45812 actively exploited?
No confirmed active exploitation of CVE-2024-45812 as of 2026-09-25.
How do I remediate CVE-2024-45812?
Priority: LOW.
What systems are affected by CVE-2024-45812?
CVE-2024-45812 affects Element; Javascript; Lookup; Relative; Script; Scripts; Vitejs Vite.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Element","product":"EDS-518A","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.