chore(deps): update dependency dompurify to v3.3.2 [security]#758
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency dompurify to v3.3.2 [security]#758renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
a7ca3db to
0c0fdfd
Compare
19c2d69 to
63de9f2
Compare
63de9f2 to
9494541
Compare
9494541 to
fddc3e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.3.1→3.3.2GitHub Vulnerability Alerts
CVE-2026-0540
DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in 2.5.9 and 3.3.2, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the
SAFE_FOR_XMLregex. Attackers can include payloads like</noscript><img src=x onerror=alert(1)>in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.GHSA-cj63-jhhr-wcxv
Summary
When
USE_PROFILESis enabled, DOMPurify rebuildsALLOWED_ATTRas a plain array before populating it with the requested allowlists. Because the sanitizer still looks up attributes viaALLOWED_ATTR[lcName], anyArray.prototypeproperty that is polluted also counts as an allowlisted attribute. An attacker who can setArray.prototype.onclick = true(or a runtime already subject to prototype pollution) can thus force DOMPurify to keep event handlers such asonclickeven when they are normally forbidden. The provided PoC sanitizes<img onclick=...>withUSE_PROFILESand adds the sanitized output to the DOM; the polluted prototype allows the event handler to survive and execute, turning what should be a blocklist into a silent XSS vector.Impact
Prototype pollution makes DOMPurify accept dangerous event handler attributes, which bypasses the sanitizer and results in DOM-based XSS once the sanitized markup is rendered.
Credits
Identified by Cantina’s Apex (https://www.cantina.security).
GHSA-cjmm-f4jc-qw8r
Summary
DOMPurify allows
ADD_ATTRto be provided as a predicate function viaEXTRA_ELEMENT_HANDLING.attributeCheck. When the predicate returnstrue,_isValidAttributeshort-circuits the attribute check before URI-safe validation runs. An attacker who supplies a predicate that accepts specific attribute/tag combinations can then sanitize input such as<a href="javascript:alert(document.domain)">and have thejavascript:URL survive, because URI validation is skipped for that attribute while other checks still pass. The provided PoC acceptshreffor anchors and then triggers a click inside an iframe, showing that the sanitized payload executes despite the protocol bypass.Impact
Predicate-based allowlisting bypasses DOMPurify's URI validation, allowing unsafe protocols such as
javascript:to reach the DOM and execute whenever the link is activated, resulting in DOM-based XSS.Credits
Identified by Cantina’s Apex (https://www.cantina.security).
Release Notes
cure53/DOMPurify (dompurify)
v3.3.2: DOMPurify 3.3.2Compare Source
_isValidAttribute, thanks @christos-ethConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.