Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. CVE-2024-45801

CVE-2024-45801: DOMPurify allows tampering by prototype pollution

September 16, 2024

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).

References

  • github.com/advisories/GHSA-mmhx-hmjr-r674
  • github.com/cure53/DOMPurify
  • github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21
  • github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc
  • github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674
  • nvd.nist.gov/vuln/detail/CVE-2024-45801

Code Behaviors & Features

Detect and mitigate CVE-2024-45801 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.5.4, all versions starting from 3.0.0 before 3.1.3

Fixed versions

  • 2.5.4
  • 3.1.3

Solution

Upgrade to versions 2.5.4, 3.1.3 or above.

Impact 7.3 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
  • CWE-1333: Inefficient Regular Expression Complexity

Source file

npm/dompurify/CVE-2024-45801.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:13 +0000.