fix(deps): update dependency sanitize-html to v2.17.7 [security] - #3091
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency sanitize-html to v2.17.7 [security]#3091renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Preview: https://3091--cinny-pr.netlify.app |
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:
2.17.6→2.17.7ApostropheCMS: Stored XSS via SVG SMIL URI-list scheme-policy bypass
CVE-2026-84371 / GHSA-g8qq-57p8-ggw5
More information
Details
Summary
When SVG animation is allowed,
attributeName="href"makesvaluesa list of URL destinations.sanitize-htmlaccepts a list that starts with a safe fragment even whenvaluesis explicitly scheme-checked, allowing a laterjavascript:destination to execute when the sanitized link is activated.Details
index.js:371-383validates each attribute as one flat URL. It does not recognize thatattributeName="href"gives the siblingvaluesattribute SMIL URI-list semantics. Forvalues="#safe;javascript:...", the leading fragment passes the flat check and the complete list is retained.PoC
This was reproduced with
sanitize-html@2.17.6and Chromium 150.0.7871.124. The configuration adds SVG animation to the defaults and applies the existing scheme policy tovalues; it does not allowjavascript:. Save this aspoc.js:Install and run it, then open
poc.htmland clickClick me:npm install sanitize-html@2.17.6 node poc.js > poc.htmlThe output retains the
javascript:entry, and clicking the sanitized SVG displaysXSS. Withinputchanged to<a href="javascript:alert(1)">control</a>, the same configuration removeshref.Impact
In an application that accepts attacker-authored SVG animation, the attacker can store this payload without scripts or event handlers. A victim who activates the sanitized link executes JavaScript in the application's origin despite the configured scheme policy.
Suggested fix
Reject
attributeNamevalues selectinghreforxlink:hrefon SVGanimateandset, while retaining safe targets such asfill. Addvalues,from, andtoregression cases.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
apostrophecms/apostrophe (sanitize-html)
v2.17.7Security
animate,animateColor,animateMotion,animateTransformorset) together withattributeNameand one of the animation value attributes. The default configuration was not affected, as these elements are not in the defaultallowedTags.apostrophecmswas not affected. Thanks to koyokr for responsibly disclosing the vulnerability (GHSA-g8qq-57p8-ggw5).Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.