[deps]: Update HtmlSanitizer to 9.0.892 [SECURITY]#839
Merged
jrmccannon merged 1 commit intomainfrom Feb 3, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #839 +/- ##
=======================================
Coverage 36.80% 36.80%
=======================================
Files 586 586
Lines 31474 31474
Branches 903 903
=======================================
Hits 11585 11585
Misses 19742 19742
Partials 147 147 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jrmccannon
approved these changes
Feb 3, 2026
Contributor
jrmccannon
left a comment
There was a problem hiding this comment.
Ran locally and seemed to be fine. Unsure why the automated migrations are failing. That will have to be looked into.
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:
9.0.886→9.0.892GitHub Vulnerability Alerts
GHSA-j92c-7v7g-gj3f
Impact
If the
templatetag is allowed, its contents are not sanitized. Thetemplatetag is a special tag that does not usually render its contents, unless theshadowrootmodeattribute is set toopenorclosed.The lack of sanitization of the template tag brings up two bypasses:
<template>tag through mutation XSS. The DOM parsers in browsers such as Chromium have a node depth limit of 512 and tags which are beyond that depth are flattened. This in turn allows elements within<template>(which are not sanitized) to be effectively 'popped out'. An example would look like this:<div>[...]<template><script>alert('xss')</script>where[...]denotes at least another 509 opening<div>tags.shadowrootmodeattribute is allowed throughsanitizer.AllowedAttributes.Add("shadowrootmode");, the simple payload of<div><template shadowrootmode="open"><script>alert('xss')</script>would bypass the sanitizer. This is because such usage of<template>attaches a shadow root to its parent:<div>, and its contents will be rendered.Note that the default configuration is not affected because the
templatetag is disallowed by default.Patches
The problem has been patched in versions 9.0.892 and 9.1.893-beta.
Workarounds
Disallow the
templatetag. It is disallowed by default.Resources
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/template
Release Notes
mganss/HtmlSanitizer (HtmlSanitizer)
v9.0.892: 9.0.892Sanitize contents of template tag
v9.0.889: 9.0.889Update NuGet packages
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 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.