Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-45812

published medium CVSS 3.1 · 6.4

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

Published
17 Sep 2024, 20:08:13 UTC
Updated
18 Sep 2024, 13:59:14 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
vitejs — vite>= 5.4.0, < 5.4.6 · >= 5.3.0, < 5.3.6 · >= 5.0.0, < 5.2.14 · >= 4.0.0, < 4.5.5 · < 3.2.11 Affected Not stated GitHub_M
vitejs — vite5.4.0 to < 5.4.6 · 5.3.0 to < 5.3.6 · 5.0.0 to < 5.2.14 · 4.0.0 to < 4.5.5 · 0 to < 3.2.11 · Other versions: unknown Affected Not stated CISA-ADP
SUSE / openSUSE openSUSE-Tumbleweed velociraptoraarch64 Advisory build 0.7.0.4.git142.862ef23-1.1 OPENSUSE-SU-2025:14663-1
SUSE / openSUSE openSUSE-Tumbleweed velociraptorppc64le Advisory build 0.7.0.4.git142.862ef23-1.1 OPENSUSE-SU-2025:14663-1
SUSE / openSUSE openSUSE-Tumbleweed velociraptors390x Advisory build 0.7.0.4.git142.862ef23-1.1 OPENSUSE-SU-2025:14663-1
SUSE / openSUSE openSUSE-Tumbleweed velociraptorx86_64 Advisory build 0.7.0.4.git142.862ef23-1.1 OPENSUSE-SU-2025:14663-1

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

1

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
6.4 / 10
Severity
medium
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
vitejs vite >= 5.4.0, < 5.4.6 (affected)>= 5.3.0, < 5.3.6 (affected)>= 5.0.0, < 5.2.14 (affected)>= 4.0.0, < 4.5.5 (affected)< 3.2.11 (affected) GitHub_M · cna
vitejs vite 5.4.0 to < 5.4.6 (affected · custom)5.3.0 to < 5.3.6 (affected · custom)5.0.0 to < 5.2.14 (affected · custom)4.0.0 to < 4.5.5 (affected · custom)0 to < 3.2.11 (affected · custom)Default: unknown CISA-ADP · adp

Weaknesses

1
  • CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (GitHub_M · cna)

References

5

Provider assertions

2

GitHub_M · cna

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

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.1
Searchable
yes
Content hash
960bc817c4b082d696962b1be84ef5ded2f099d068579278ad5cd91a43bd6967
Ingested
23 Sep 2026, 08:27:47 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected