CVE-2024-47875: DOMPurify nesting-based mXSS

Published Oct 11, 2024
·
Updated

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to nesting-based mXSS. This vulnerability is fixed in 2.5.0 and 3.1.3.

Other sources

DOMpurify was vulnerable to nesting-based mXSS

fixed by 0ef5e537 (2.x) and merge 943

Backporter should be aware of GHSA-mmhx-hmjr-r674 (CVE-2024-45801) when cherry-picking

POC is avaible under test

— GitHub

Affected Software

13 affected componentsFixes available
npm/dompurify>=3.0.0<3.1.3
3.1.3
npm/dompurify<2.5.0
2.5.0
Cure53 DOMPurify<2.5.0
Cure53 DOMPurify>=3.0.0<3.1.3
IBM watsonx.data intelligence<=5.2.0, 5.2.1, 5.3.0, 5.3.1
debian/cacti<1.2.24+ds1-1+deb12u2
1.2.24+ds1-1+deb12u2
debian/cacti<1.2.26+ds1-1
1.2.26+ds1-1
debian/cacti<1.2.26+ds1-1
1.2.26+ds1-1
debian/node-dompurify<2.4.1+dfsg+~2.4.0-2
2.4.1+dfsg+~2.4.0-2
debian/node-dompurify<3.1.6+dfsg+~3.0.5-1
3.1.6+dfsg+~3.0.5-1
debian/node-dompurify<3.1.6+dfsg+~3.0.5-1
3.1.6+dfsg+~3.0.5-1
debian/cacti
1.2.24+ds1-1+deb12u51.2.30+ds1-11.2.31+ds1-4
debian/node-dompurify
2.4.1+dfsg+~2.4.0-2+deb12u12.4.1+dfsg+~2.4.0-23.1.7+dfsg+~3.0.5-23.4.17+dfsg-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/dompurify to a version that resolves this vulnerability.

    Fixed in 3.1.3
  2. Upgrade

    Upgrade npm/dompurify to a version that resolves this vulnerability.

    Fixed in 2.5.0
  3. Upgrade

    Upgrade debian/cacti to a version that resolves this vulnerability.

    Fixed in 1.2.24+ds1-1+deb12u2
  4. Upgrade

    Upgrade debian/cacti to a version that resolves this vulnerability.

    Fixed in 1.2.26+ds1-1
  5. Upgrade

    Upgrade debian/node-dompurify to a version that resolves this vulnerability.

    Fixed in 2.4.1+dfsg+~2.4.0-2
  6. Upgrade

    Upgrade debian/node-dompurify to a version that resolves this vulnerability.

    Fixed in 3.1.6+dfsg+~3.0.5-1
  7. Upgrade

    Upgrade debian/cacti to a version that resolves this vulnerability.

    Fixed in 1.2.24+ds1-1+deb12u5Fixed in 1.2.30+ds1-1Fixed in 1.2.31+ds1-4
  8. Upgrade

    Upgrade debian/node-dompurify to a version that resolves this vulnerability.

    Fixed in 2.4.1+dfsg+~2.4.0-2+deb12u1Fixed in 2.4.1+dfsg+~2.4.0-2Fixed in 3.1.7+dfsg+~3.0.5-2Fixed in 3.4.17+dfsg-1
  9. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 2.5.0
  10. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 3.1.3

Event History

Oct 11, 2024
CVE Published
via MITRE·02:59 PM
Data Sourced
via MITRE·02:59 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software
Data Sourced
via Red Hat·03:20 PM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·05:27 PM
Sep 2, 2025
Exploit Published
via GitHub·02:50 PM
Apr 27, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-47875?

The severity of CVE-2024-47875 is classified as high due to its potential for cross-site scripting attacks.

2

How do I fix CVE-2024-47875?

To fix CVE-2024-47875, update DOMPurify to version 2.5.0 or 3.1.3 or later.

3

What type of vulnerability is CVE-2024-47875?

CVE-2024-47875 is a nesting-based mXSS vulnerability affecting the DOMPurify library.

4

What versions of DOMPurify are affected by CVE-2024-47875?

CVE-2024-47875 affects DOMPurify versions between 3.0.0 and 3.1.2, as well as versions below 2.5.0.

5

Is CVE-2024-47875 a critical vulnerability?

Yes, CVE-2024-47875 is considered a critical vulnerability due to the risk of executing malicious scripts.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203