GHSA-mmhx-hmjr-r674
DOMPurify allows tampering by prototype pollution
Quick fix
GHSA-mmhx-hmjr-r674 — dompurify: upgrade to the fixed version with the command below.
npm install dompurify@2.5.4Details
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).
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2024-45801[ADVISORY]
- https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21[WEB]
- https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc[WEB]
- https://github.com/cure53/DOMPurify[PACKAGE]
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/dompurify"]}'