[openstreetmap/openstreetmap-website] Bump sanitize from 6.0.0 to 6.0.1 (PR #3912)
dependabot[bot]
notifications at github.com
Sat Jan 28 01:21:12 UTC 2023
Bumps [sanitize](https://github.com/rgrove/sanitize) from 6.0.0 to 6.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rgrove/sanitize/releases">sanitize's releases</a>.</em></p>
<blockquote>
<h2>v6.0.1</h2>
<h3>Bug Fixes</h3>
<ul>
<li>
<p>Sanitize now always removes <code><noscript></code> elements and their contents, even when <code>noscript</code> is in the allowlist.</p>
<p>This fixes a sanitization bypass that could occur when <code>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>Sanitize's default configs don't allow <code><noscript></code> elements and are not vulnerable. This issue only affects users who are using a custom config that adds <code>noscript</code> to the element allowlist.</p>
<p>The root cause of this issue is that HTML parsing rules treat the contents of a <code><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><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>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>Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias">TU Braunschweig</a> (<a href="https://github.com/leeN"><code>@leeN</code></a>) for reporting this issue.</p>
</li>
<li>
<p>Fixed an edge case in which the contents of an "unescaped text" element (such as <code><noembed></code> or <code><xmp></code>) were not properly escaped if that element was allowlisted and was also inside an allowlisted <code><math></code> or <code><svg></code> element.</p>
<p>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><math></code> or <code><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>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>Documentation has been updated to add more warnings and to make the existing warnings about this more prominent.</p>
<p>Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias">TU Braunschweig</a> (<a href="https://github.com/leeN"><code>@leeN</code></a>) for reporting this issue.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rgrove/sanitize/blob/main/HISTORY.md">sanitize's changelog</a>.</em></p>
<blockquote>
<h2>6.0.1 (2023-01-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>
<p>Sanitize now always removes <code><noscript></code> elements and their contents, even
when <code>noscript</code> is in the allowlist.</p>
<p>This fixes a sanitization bypass that could occur when <code>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>Sanitize's default configs don't allow <code><noscript></code> elements and are not
vulnerable. This issue only affects users who are using a custom config that
adds <code>noscript</code> to the element allowlist.</p>
<p>The root cause of this issue is that HTML parsing rules treat the contents of
a <code><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><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>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>Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias">TU Braunschweig</a>
(<a href="https://github.com/leeN"><code>@leeN</code></a>) for reporting this issue.</p>
</li>
<li>
<p>Fixed an edge case in which the contents of an "unescaped text" element (such
as <code><noembed></code> or <code><xmp></code>) were not properly escaped if that element was
allowlisted and was also inside an allowlisted <code><math></code> or <code><svg></code> element.</p>
<p>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><math></code> or <code><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>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>Documentation has been updated to add more warnings and to make the existing
warnings about this more prominent.</p>
<p>Thanks to David Klein from <a href="https://www.tu-braunschweig.de/en/ias">TU Braunschweig</a></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/rgrove/sanitize/commit/a92f21cd223a32a1737262d68e56a4fb8b9470f9"><code>a92f21c</code></a> Release 6.0.1</li>
<li><a href="https://github.com/rgrove/sanitize/commit/7ac1dfb413f85bc15130435d64326576a345fe8a"><code>7ac1dfb</code></a> Update links</li>
<li><a href="https://github.com/rgrove/sanitize/commit/784e78915a8fa9decbc67a06b85664432a3d14ab"><code>784e789</code></a> Remove outdated comparison</li>
<li><a href="https://github.com/rgrove/sanitize/commit/ec14265e530dc3fe31ce2ef773594d3a97778d22"><code>ec14265</code></a> Always remove <code>\<noscript></code> elements</li>
<li><a href="https://github.com/rgrove/sanitize/commit/b4ee521df0d0616340c9648444be488381c238b1"><code>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>94d5c22</code></a> Add Ruby 3.1 to the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/55f766e7a7857efeead30792f4646d10c693e819"><code>55f766e</code></a> Simplify the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/69b4597a6e08600459bb925ebb4fabb166573784"><code>69b4597</code></a> Use actions/checkout at v3</li>
<li><a href="https://github.com/rgrove/sanitize/commit/2924038559e7ea3ce52c0d968bda8022fcb58149"><code>2924038</code></a> Add Ruby 3.1 to the test matrix</li>
<li><a href="https://github.com/rgrove/sanitize/commit/ce1af491a9b36eed4cdc38e8ea3c85743b804129"><code>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 />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/openstreetmap/openstreetmap-website/network/alerts).
</details>
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3912
-- Commit Summary --
* Bump sanitize from 6.0.0 to 6.0.1
-- File Changes --
M Gemfile.lock (2)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3912.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3912.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3912
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3912 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230127/b9d0595d/attachment-0001.htm>
More information about the rails-dev
mailing list