📦 Update dependency dompurify to v3.3.2 [SECURITY] - autoclosed#40150
Closed
renovate[bot] wants to merge 1 commit intomainfrom
Closed
📦 Update dependency dompurify to v3.3.2 [SECURITY] - autoclosed#40150renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
ebdb1b6 to
4cf819e
Compare
ac03d04 to
4132d6b
Compare
4132d6b to
41fb487
Compare
bb0fdbf to
f7cdfac
Compare
f7cdfac to
0a78489
Compare
0a78489 to
ca2dafd
Compare
ca2dafd to
73cb95a
Compare
73cb95a to
a48fa91
Compare
7f13333 to
409116d
Compare
409116d to
67c8f74
Compare
3ea0cb9 to
67c8f74
Compare
67c8f74 to
3ea0cb9
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.0.2→3.3.2See all other Renovate PRs on the Dependency Dashboard
How to resolve breaking changes
This PR may introduce breaking changes that require manual intervention. In such cases, you will need to check out this branch, fix the cause of the breakage, and commit the fix to ensure a green CI build. To check out and update this PR, follow the steps below:
GitHub Vulnerability Alerts
GHSA-h8r8-wccr-v5f2
Description
A mutation-XSS (mXSS) condition was confirmed when sanitized HTML is reinserted into a new parsing context using
innerHTMLand special wrappers. The vulnerable wrappers confirmed in browser behavior arescript,xmp,iframe,noembed,noframes, andnoscript. The payload remains seemingly benign afterDOMPurify.sanitize(), but mutates during the second parse into executable markup with an event handler, enabling JavaScript execution in the client (alert(1)in the PoC).Vulnerability
The root cause is context switching after sanitization: sanitized output is treated as trusted and concatenated into a wrapper string (for example,
<xmp> ... </xmp>or other special wrappers) before being reparsed by the browser. In this flow, attacker-controlled text inside an attribute (for example</xmp>or equivalent closing sequences for each wrapper) closes the special parsing context early and reintroduces attacker markup (<img ... onerror=...>) outside the original attribute context. DOMPurify sanitizes the original parse tree, but the application performs a second parse in a different context, reactivating dangerous tokens (classic mXSS pattern).PoC
http://localhost:3001.Wrapper en sinktoxmp.Sanitize + Render.Sanitized responsestill contains the</xmp>sequence insidealt.<img src="x" onerror="alert('expoc')">.alert('expoc')is triggered.{ "name": "expoc", "version": "1.0.0", "main": "server.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node server.js", "dev": "node server.js" }, "keywords": [], "author": "", "license": "ISC", "description": "", "dependencies": { "dompurify": "^3.3.1", "express": "^5.2.1", "jsdom": "^28.1.0" } }Evidence
daft-video.webm
Why This Happens
This is a mutation-XSS pattern caused by a parse-context mismatch:
xmpraw-text behavior).</xmp>) gains structural meaning in parse 2 and alters DOM structure.Sanitization is not a universal guarantee across all future parsing contexts. The sink design reintroduces risk.
Remediation Guidance
innerHTML.textContent,createElement,setAttribute) over string-based HTML composition.xmp,script, etc.).</xmp>,</noscript>, similar parser-breakout markers).Reported by Oscar Uribe, Security Researcher at Fluid Attacks. Camilo Vera and Cristian Vargas from the Fluid Attacks Research Team have identified a mXSS via Re-Contextualization in DomPurify 3.3.1.
Following Fluid Attacks Disclosure Policy, if this report corresponds to a vulnerability and the conditions outlined in the policy are met, this advisory will be published on the website over the next few days (the timeline may vary depending on maintainers' willingness to attend to and respond to this report) at the following URL: https://fluidattacks.com/advisories/daft
Acknowledgements: Camilo Vera and Cristian Vargas.
Release Notes
cure53/DOMPurify (dompurify)
v3.3.2: DOMPurify 3.3.2Compare Source
_isValidAttribute, thanks @christos-ethv3.3.1: DOMPurify 3.3.1Compare Source
ADD_FORBID_CONTENTSsetting to extend default list, thanks @MariusRumpfv3.3.0: DOMPurify 3.3.0Compare Source
mask-typeattribute to default allow-list, thanks @prasadrajandranADD_ATTRandADD_TAGSto accept functions, thanks @nelstromslotelement being in both SVG and HTML allow-list, thanks @Wim-Valgaerenv3.2.7: DOMPurify 3.2.7Compare Source
tagNameparameter to custom elementattributeNameCheck, thanks @nelstromhrefattributes, thanks @llamakkov3.2.6: DOMPurify 3.2.6Compare Source
matrix:as an allowed URI scheme, thanks @kleinesfilmroellchenv3.2.5: DOMPurify 3.2.5Compare Source
ALLOWED_URI_REGEXPusing the 'g' flag, thanks @hhk-pngv3.2.4: DOMPurify 3.2.4Compare Source
v3.2.3: DOMPurify 3.2.3Compare Source
v3.2.2: DOMPurify 3.2.2Compare Source
v3.2.1: DOMPurify 3.2.1Compare Source
v3.2.0: DOMPurify 3.2.0Compare Source
v3.1.7: DOMPurify 3.1.7Compare Source
foreignObjectelement from the list of HTML entry-points, thanks @masatokinugawav3.1.6: DOMPurify 3.1.6Compare Source
v3.1.5: DOMPurify 3.1.5Compare Source
bower.js, thanks @HakumenNCv3.1.4: DOMPurify 3.1.4Compare Source
isNaNchecks, thanks @tulachv3.1.3: DOMPurify 3.1.3Compare Source
nodeTypeproperty, thanks @ssi02014v3.1.2: DOMPurify 3.1.2Compare Source
v3.1.1: DOMPurify 3.1.1Compare Source
Note that this is a security release and should be upgraded to immediately. Please also note that further releases may follow as the underlying vulnerability is apparently new and further variations may be discovered.
v3.1.0: DOMPurify 3.1.0Compare Source
SAFE_FOR_XMLto enable better control over comment scrubbingv3.0.11: DOMPurify 3.0.11Compare Source
v3.0.10: DOMPurify 3.0.10Compare Source
v3.0.9: DOMPurify 3.0.9Compare Source
hasOwnPropertylogic, thanks @ssi02014console.warnmaking HappyDom happier, thanks @HugoPoiv3.0.8: DOMPurify 3.0.8Compare Source
v3.0.7: DOMPurify 3.0.7Compare Source
v3.0.6: DOMPurify 3.0.6Compare Source
v3.0.5: DOMPurify 3.0.5Compare Source
v3.0.4: DOMPurify 3.0.4Compare Source
shadowrootmodwhich should beshadowrootmode, thanks @masatokinugawav3.0.3: DOMPurify 3.0.3Compare Source
TRUSTED_TYPES_POLICYconfiguration option, thanks @dejangfeDropShadowto the SVG filter allow-list, thanks @SelfMadeSystemConfiguration
📅 Schedule: Branch creation - "" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, 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.