CVE-2024-48910
NoneCVSS
—
EPSS
1.2%
Published
Oct 31, 2024
CISA due date
—
Cloudanix analysis
A flaw in a popular tool that cleans user-provided web content could let attackers change how applications behave, potentially weakening security protections.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
Allows an attacker to pollute the JavaScript object prototype through specially crafted input processed by the sanitizer, potentially altering the behavior of the application and bypassing security controls.
Why it matters to the business
Applications relying on this library for sanitizing user content may experience unexpected behavior or security control bypasses, increasing risk of data exposure or unauthorized actions in web environments.
How an attack unfolds
An attacker supplies malicious input containing prototype pollution payloads to the DOMPurify sanitization function, which fails to properly sanitize it, leading to modifications in the global Object prototype that can be leveraged for further attacks.
How to fix it
Update DOMPurify to version 2.4.2 or later, specifically applying commit f1e180fcccc2766a10b7a88ee133cd4d1d8e44e5 in the GIT repository.
How to confirm the fix worked
Verify the library version is at least 2.4.2 and test sanitization with known prototype pollution vectors to confirm they are neutralized.
Typical attack path
- Identify application using vulnerable DOMPurify version
- Craft prototype pollution payload in HTML/MathML/SVG input
- Submit input to the sanitization endpoint
- Observe or exploit side effects from polluted prototype
How to detect it
Monitor for unusual prototype modifications or errors in JavaScript execution related to object properties in applications using the sanitizer; review server logs for suspicious input patterns targeting sanitization functions.
What your security team should do
- Prioritize updating all instances of DOMPurify to the fixed version
- Review applications for direct or indirect use of this library
- Implement additional input validation where possible
The record
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify was vulnerable to prototype pollution. This vulnerability is fixed in 2.4.2.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | dompurify | 0 | 2.4.2 |
| Debian:11 | cacti | 0 | No fix |
| Debian:11 | cacti | 0 | 1.2.16+ds1-2+deb11u5 |
| Debian:12 | cacti | 0 | 1.2.24+ds1-1+deb12u2 |
| Debian:12 | node-dompurify | 0 | No fix |
| Debian:13 | cacti | 0 | 1.2.26+ds1-1 |
| Debian:13 | node-dompurify | 0 | 3.0.9+dfsg+~3.0.5-1 |
| Debian:14 | cacti | 0 | 1.2.26+ds1-1 |
| Debian:14 | node-dompurify | 0 | 3.0.9+dfsg+~3.0.5-1 |
| Ubuntu:22.04:LTS | node-dompurify | 0 | No fix |
| Ubuntu:24.04:LTS | node-dompurify | 0 | 3.0.9+dfsg+~3.0.5-1 |
Related vulnerabilities
- GHSA-cmwh-pvxp-8882 DOMPurify: Permanent `ALLOWED_ATTR` pollution via `setConfig()` bypassing the hook… Also affects dompurify
- GHSA-vxr8-fq34-vvx9 DOMPurify: Trusted Types policy survives `clearConfig()` and can poison later… Also affects dompurify
- GHSA-gvmj-g25r-r7wr DOMPurify: SAFE_FOR_TEMPLATES bypass - template expressions survive sanitization inside… Also affects dompurify
- GHSA-rp9w-3fw7-7cwq DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside .content Also affects dompurify
- GHSA-x4vx-rjvf-j5p4 DOMPurify: `IN_PLACE` mode trusts attacker-controlled `nodeName` on live non-form nodes… Also affects dompurify
- GHSA-76mc-f452-cxcm DOMPurify: Hook mutation of `data.allowedTags` / `data.allowedAttributes` permanently… Also affects dompurify
- GHSA-hpcv-96wg-7vj8 DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via… Also affects dompurify
- GHSA-r47g-fvhr-h676 DOMPurify: IN_PLACE mode preserves attributes of a clobbered root element, allowing XSS… Also affects dompurify