NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

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

highCVSS 4.0 8.3 · 3.1 7.0GHSA-mmhx-hmjr-r674

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.

Published Sep 16, 2024

Affected packages

dompurify

Ecosystem
npm
Affected
< 2.5.4
Fixed in
2.5.4
Check
npm ls dompurify

dompurify

Ecosystem
npm
Affected
>= 3.0.0, < 3.1.3
Fixed in
3.1.3
Check
npm ls dompurify

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to eslerm, cure53.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries