CVE-2024-45801
JavaScript vulnerability analysis and mitigation

Overview

DOMPurify, a DOM-only XSS sanitizer for HTML, MathML and SVG, was found to have a vulnerability (CVE-2024-45801) where malicious HTML using special nesting techniques could bypass the depth checking mechanism added in recent releases. Additionally, it was possible to use Prototype Pollution to weaken the depth check, rendering DOMPurify unable to prevent cross-site scripting (XSS) attacks. This vulnerability was discovered and disclosed on September 16, 2024, affecting versions prior to 2.5.4 and 3.1.3 (GitHub Advisory).

Technical details

The vulnerability stems from a weakness in DOMPurify's depth checking mechanism that could be exploited through special HTML nesting techniques and prototype pollution. The issue has been assigned a CVSS v3.1 base score of 7.0 (High), with a vector string of CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L. The vulnerability is classified under CWE-1321 and allows attackers to bypass security controls meant to prevent XSS attacks (GitHub Advisory).

Impact

The vulnerability allows attackers to bypass DOMPurify's XSS protection mechanisms, potentially leading to successful cross-site scripting attacks. This could result in unauthorized data access (low impact on confidentiality), significant data modification (high impact on integrity), and minor service disruptions (low impact on availability) (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in DOMPurify versions 2.5.4 and 3.1.3. All users are advised to upgrade to these patched versions. The fixes were implemented through commits 1e52026 (3.x branch) and 26e1d69 (2.x branch), which hardened the depth tracking code against prototype pollution. There are no known workarounds for this vulnerability (NVD).

Community reactions

The vulnerability has been acknowledged and addressed by multiple organizations, including Red Hat, which has incorporated the fix into their products such as Red Hat OpenShift Dev Spaces 3.18.0 release (Red Hat Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management