<p dir="auto">Bumps <a href="https://github.com/rgrove/sanitize">sanitize</a> from 6.0.0 to 6.0.1.</p>
<details>
<summary>Release notes</summary>
<p dir="auto"><em>Sourced from <a href="https://github.com/rgrove/sanitize/releases">sanitize's releases</a>.</em></p>
<blockquote>
<h2 dir="auto">v6.0.1</h2>
<h3 dir="auto">Bug Fixes</h3>
<ul dir="auto">
<li>
<p dir="auto">Sanitize now always removes <code class="notranslate"><noscript></code> elements and their contents, even when <code class="notranslate">noscript</code> is in the allowlist.</p>
<p dir="auto">This fixes a sanitization bypass that could occur when <code class="notranslate">noscript</code> was allowed by a custom allowlist. In this scenario, carefully crafted input could sneak arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site scripting) attack.</p>
<p dir="auto">Sanitize's default configs don't allow <code class="notranslate"><noscript></code> elements and are not vulnerable. This issue only affects users who are using a custom config that adds <code class="notranslate">noscript</code> to the element allowlist.</p>
<p dir="auto">The root cause of this issue is that HTML parsing rules treat the contents of a <code class="notranslate"><noscript></code> element differently depending on whether scripting is enabled in the user agent. Nokogiri doesn't support scripting so it follows the "scripting disabled" rules, but a web browser with scripting enabled will follow the "scripting enabled" rules. This means that Sanitize can't reliably make the contents of a <code class="notranslate"><noscript></code> element safe for scripting enabled browsers, so the safest thing to do is to remove the element and its contents entirely.</p>
<p dir="auto">See the following security advisory for additional details: <a href="https://github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7">GHSA-fw3g-2h3j-qmm7</a></p>
<p dir="auto">Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias" rel="nofollow">TU Braunschweig</a> (<a href="https://github.com/leeN"><code class="notranslate">@leeN</code></a>) for reporting this issue.</p>
</li>
<li>
<p dir="auto">Fixed an edge case in which the contents of an "unescaped text" element (such as <code class="notranslate"><noembed></code> or <code class="notranslate"><xmp></code>) were not properly escaped if that element was allowlisted and was also inside an allowlisted <code class="notranslate"><math></code> or <code class="notranslate"><svg></code> element.</p>
<p dir="auto">The only way to encounter this situation was to ignore multiple warnings in the readme and create a custom config that allowlisted all the elements involved, including <code class="notranslate"><math></code> or <code class="notranslate"><svg></code>. If you're using a default config or if you heeded the warnings about MathML and SVG not being supported, you're not affected by this issue.</p>
<p dir="auto">Please let this be a reminder that Sanitize cannot safely sanitize MathML or SVG content and does not support this use case. The default configs don't allow MathML or SVG elements, and allowlisting MathML or SVG elements in a custom config may create a security vulnerability in your application.</p>
<p dir="auto">Documentation has been updated to add more warnings and to make the existing warnings about this more prominent.</p>
<p dir="auto">Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias" rel="nofollow">TU Braunschweig</a> (<a href="https://github.com/leeN"><code class="notranslate">@leeN</code></a>) for reporting this issue.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p dir="auto"><em>Sourced from <a href="https://github.com/rgrove/sanitize/blob/main/HISTORY.md">sanitize's changelog</a>.</em></p>
<blockquote>
<h2 dir="auto">6.0.1 (2023-01-27)</h2>
<h3 dir="auto">Bug Fixes</h3>
<ul dir="auto">
<li>
<p dir="auto">Sanitize now always removes <code class="notranslate"><noscript></code> elements and their contents, even
when <code class="notranslate">noscript</code> is in the allowlist.</p>
<p dir="auto">This fixes a sanitization bypass that could occur when <code class="notranslate">noscript</code> was allowed
by a custom allowlist. In this scenario, carefully crafted input could sneak
arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site
scripting) attack.</p>
<p dir="auto">Sanitize's default configs don't allow <code class="notranslate"><noscript></code> elements and are not
vulnerable. This issue only affects users who are using a custom config that
adds <code class="notranslate">noscript</code> to the element allowlist.</p>
<p dir="auto">The root cause of this issue is that HTML parsing rules treat the contents of
a <code class="notranslate"><noscript></code> element differently depending on whether scripting is enabled
in the user agent. Nokogiri doesn't support scripting so it follows the
"scripting disabled" rules, but a web browser with scripting enabled will
follow the "scripting enabled" rules. This means that Sanitize can't reliably
make the contents of a <code class="notranslate"><noscript></code> element safe for scripting enabled
browsers, so the safest thing to do is to remove the element and its contents
entirely.</p>
<p dir="auto">See the following security advisory for additional details:
<a href="https://github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7">GHSA-fw3g-2h3j-qmm7</a></p>
<p dir="auto">Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias" rel="nofollow">TU Braunschweig</a>
(<a href="https://github.com/leeN"><code class="notranslate">@leeN</code></a>) for reporting this issue.</p>
</li>
<li>
<p dir="auto">Fixed an edge case in which the contents of an "unescaped text" element (such
as <code class="notranslate"><noembed></code> or <code class="notranslate"><xmp></code>) were not properly escaped if that element was
allowlisted and was also inside an allowlisted <code class="notranslate"><math></code> or <code class="notranslate"><svg></code> element.</p>
<p dir="auto">The only way to encounter this situation was to ignore multiple warnings in
the readme and create a custom config that allowlisted all the elements
involved, including <code class="notranslate"><math></code> or <code class="notranslate"><svg></code>. If you're using a default config or
if you heeded the warnings about MathML and SVG not being supported, you're
not affected by this issue.</p>
<p dir="auto">Please let this be a reminder that Sanitize cannot safely sanitize MathML or
SVG content and does not support this use case. The default configs don't
allow MathML or SVG elements, and allowlisting MathML or SVG elements in a
custom config may create a security vulnerability in your application.</p>
<p dir="auto">Documentation has been updated to add more warnings and to make the existing
warnings about this more prominent.</p>
<p dir="auto">Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias" rel="nofollow">TU Braunschweig</a></p>
</li>
</ul>
</blockquote>
<p dir="auto">... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul dir="auto">
<li><a href="https://github.com/rgrove/sanitize/commit/a92f21cd223a32a1737262d68e56a4fb8b9470f9"><code class="notranslate">a92f21c</code></a> Release 6.0.1</li>
<li><a href="https://github.com/rgrove/sanitize/commit/7ac1dfb413f85bc15130435d64326576a345fe8a"><code class="notranslate">7ac1dfb</code></a> Update links</li>
<li><a href="https://github.com/rgrove/sanitize/commit/784e78915a8fa9decbc67a06b85664432a3d14ab"><code class="notranslate">784e789</code></a> Remove outdated comparison</li>
<li><a href="https://github.com/rgrove/sanitize/commit/ec14265e530dc3fe31ce2ef773594d3a97778d22"><code class="notranslate">ec14265</code></a> Always remove <code class="notranslate">\<noscript></code> elements</li>
<li><a href="https://github.com/rgrove/sanitize/commit/b4ee521df0d0616340c9648444be488381c238b1"><code class="notranslate">b4ee521</code></a> Forcibly escape content in "unescaped text" elements inside math or svg names...</li>
<li><a href="https://github.com/rgrove/sanitize/commit/94d5c220cd5f22f3865ed448b44215733a6976dc"><code class="notranslate">94d5c22</code></a> Add Ruby 3.1 to the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/55f766e7a7857efeead30792f4646d10c693e819"><code class="notranslate">55f766e</code></a> Simplify the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/69b4597a6e08600459bb925ebb4fabb166573784"><code class="notranslate">69b4597</code></a> Use actions/checkout@v3</li>
<li><a href="https://github.com/rgrove/sanitize/commit/2924038559e7ea3ce52c0d968bda8022fcb58149"><code class="notranslate">2924038</code></a> Add Ruby 3.1 to the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/ce1af491a9b36eed4cdc38e8ea3c85743b804129"><code class="notranslate">ce1af49</code></a> Update the online demo link</li>
<li>Additional commits viewable in <a href="https://github.com/rgrove/sanitize/compare/v6.0.0...v6.0.1">compare view</a></li>
</ul>
</details>
<br>
<p dir="auto"><a href="https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores"><img src="https://camo.githubusercontent.com/992744946adac44c825a60e7e73274a50b09fb0a5de923097eb5b19e0fc48070/68747470733a2f2f646570656e6461626f742d6261646765732e6769746875626170702e636f6d2f6261646765732f636f6d7061746962696c6974795f73636f72653f646570656e64656e63792d6e616d653d73616e6974697a65267061636b6167652d6d616e616765723d62756e646c65722670726576696f75732d76657273696f6e3d362e302e30266e65772d76657273696f6e3d362e302e31" alt="Dependabot compatibility score" data-canonical-src="https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sanitize&package-manager=bundler&previous-version=6.0.0&new-version=6.0.1" style="max-width: 100%;"></a></p>
<p dir="auto">Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting <code class="notranslate">@dependabot rebase</code>.</p>
<hr>
<details>
<summary>Dependabot commands and options</summary>
<br>
<p dir="auto">You can trigger Dependabot actions by commenting on this PR:</p>
<ul dir="auto">
<li><code class="notranslate">@dependabot rebase</code> will rebase this PR</li>
<li><code class="notranslate">@dependabot recreate</code> will recreate this PR, overwriting any edits that have been made to it</li>
<li><code class="notranslate">@dependabot merge</code> will merge this PR after your CI passes on it</li>
<li><code class="notranslate">@dependabot squash and merge</code> will squash and merge this PR after your CI passes on it</li>
<li><code class="notranslate">@dependabot cancel merge</code> will cancel a previously requested merge and block automerging</li>
<li><code class="notranslate">@dependabot reopen</code> will reopen this PR if it is closed</li>
<li><code class="notranslate">@dependabot close</code> will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually</li>
<li><code class="notranslate">@dependabot ignore this major version</code> will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)</li>
<li><code class="notranslate">@dependabot ignore this minor version</code> will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)</li>
<li><code class="notranslate">@dependabot ignore this dependency</code> will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)<br>
You can disable automated security fix PRs for this repo from the <a href="https://github.com/openstreetmap/openstreetmap-website/network/alerts">Security Alerts page</a>.</li>
</ul>
</details>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3912'>https://github.com/openstreetmap/openstreetmap-website/pull/3912</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3912/commits/18f08652744c8e93632a59fc9761e613706c0972" class="commit-link">18f0865</a> Bump sanitize from 6.0.0 to 6.0.1</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3912/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3912/files#diff-89cade48462044ee1b672dc5f4c3ec250fbd29effcd8932096a23c1283c6731f">Gemfile.lock</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3912.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3912.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3912.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3912.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3912">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOTM6N4IH6DIZDSRYLWURYARANCNFSM6AAAAAAUJLA2OM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOJKHCICUM77LKDPXDWURYARA5CNFSM6AAAAAAUJLA2OOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHF2BJOM4.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3912</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3912",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3912",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>