Advisory

GHSA-mmhx-hmjr-r674

Also known as: CVE-2024-45801

Summary

DOMPurify allows tampering by prototype pollution

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-09-16 20:34 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

dompurify

npm · All systems

Affected

  • introduced 0, fixed 2.5.4 (semver)

Fixed versions

2.5.4

Fix

dompurify

npm · All systems

Affected

  • introduced 3.0.0, fixed 3.1.3 (semver)

Fixed versions

3.1.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences