GitHub Advisoryadvisory · npm

GHSA-mmhx-hmjr-r674 DOMPurify allows tampering by prototype pollution

HIGH Published 2024-09-16 Modified 2024-09-16 Official page ↗
Aliases
CVE-2024-45801
Ecosystem
npm
Packages
dompurify
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
Weaknesses
CWE-1321, CWE-1333
Reviewed
2024-09-16

Affected packages

• npm dompurify: < 2.5.4 → fixed in 2.5.4 • npm dompurify: >= 3.0.0, < 3.1.3 → fixed in 3.1.3

Description

It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It was also possible to use Prototype Pollution to weaken the depth check. This renders dompurify unable to avoid XSS attack. Fixed by https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21 (3.x branch) and https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc (2.x branch).

Related

Alias · CVE (1)

  • CVE-2024-45801 DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. vulnerability

Weakness · CWE (2)

  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness
  • CWE-1333 Inefficient Regular Expression Complexity weakness

References