Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump sanitize from 6.0.0 to 6.0.1 in /pkgs/servers/web-apps/discourse/rubyEnv #193

Open
wants to merge 10 commits into
base: last-known-good
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Jan 28, 2023

Bumps sanitize from 6.0.0 to 6.0.1.

Release notes

Sourced from sanitize's releases.

v6.0.1

Bug Fixes

  • Sanitize now always removes <noscript> elements and their contents, even when noscript is in the allowlist.

    This fixes a sanitization bypass that could occur when noscript 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.

    Sanitize's default configs don't allow <noscript> elements and are not vulnerable. This issue only affects users who are using a custom config that adds noscript to the element allowlist.

    The root cause of this issue is that HTML parsing rules treat the contents of a <noscript> 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 <noscript> element safe for scripting enabled browsers, so the safest thing to do is to remove the element and its contents entirely.

    See the following security advisory for additional details: GHSA-fw3g-2h3j-qmm7

    Thanks to David Klein from TU Braunschweig (@​leeN) for reporting this issue.

  • Fixed an edge case in which the contents of an "unescaped text" element (such as <noembed> or <xmp>) were not properly escaped if that element was allowlisted and was also inside an allowlisted <math> or <svg> element.

    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 <math> or <svg>. 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.

    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.

    Documentation has been updated to add more warnings and to make the existing warnings about this more prominent.

    Thanks to David Klein from TU Braunschweig (@​leeN) for reporting this issue.

Changelog

Sourced from sanitize's changelog.

6.0.1 (2023-01-27)

Bug Fixes

  • Sanitize now always removes <noscript> elements and their contents, even when noscript is in the allowlist.

    This fixes a sanitization bypass that could occur when noscript 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.

    Sanitize's default configs don't allow <noscript> elements and are not vulnerable. This issue only affects users who are using a custom config that adds noscript to the element allowlist.

    The root cause of this issue is that HTML parsing rules treat the contents of a <noscript> 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 <noscript> element safe for scripting enabled browsers, so the safest thing to do is to remove the element and its contents entirely.

    See the following security advisory for additional details: GHSA-fw3g-2h3j-qmm7

    Thanks to David Klein from TU Braunschweig (@​leeN) for reporting this issue.

  • Fixed an edge case in which the contents of an "unescaped text" element (such as <noembed> or <xmp>) were not properly escaped if that element was allowlisted and was also inside an allowlisted <math> or <svg> element.

    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 <math> or <svg>. 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.

    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.

    Documentation has been updated to add more warnings and to make the existing warnings about this more prominent.

    Thanks to David Klein from TU Braunschweig

... (truncated)

Commits
  • a92f21c Release 6.0.1
  • 7ac1dfb Update links
  • 784e789 Remove outdated comparison
  • ec14265 Always remove \<noscript> elements
  • b4ee521 Forcibly escape content in "unescaped text" elements inside math or svg names...
  • 94d5c22 Add Ruby 3.1 to the test matrix
  • 55f766e Simplify the test matrix
  • 69b4597 Use actions/checkout@v3
  • 2924038 Add Ruby 3.1 to the test matrix
  • ce1af49 Update the online demo link
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Jan 28, 2023
@jwiegley jwiegley force-pushed the last-known-good branch 6 times, most recently from 6e6b4f5 to 2dccd51 Compare February 4, 2023 07:52
@jwiegley jwiegley force-pushed the last-known-good branch 7 times, most recently from 98e1ff5 to a9b4d9c Compare February 12, 2023 07:54
@jwiegley jwiegley force-pushed the last-known-good branch 3 times, most recently from 7d4575f to 9c04038 Compare February 19, 2023 16:53
Bumps [sanitize](https://github.com/rgrove/sanitize) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/rgrove/sanitize/releases)
- [Changelog](https://github.com/rgrove/sanitize/blob/main/HISTORY.md)
- [Commits](rgrove/sanitize@v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: sanitize
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/bundler/pkgs/servers/web-apps/discourse/rubyEnv/sanitize-6.0.1 branch from 17b7dad to 453872e Compare February 22, 2023 07:26
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from a2ea9dc to e9a4ecc Compare January 30, 2024 17:48
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from 03f5f2e to 41658f1 Compare February 5, 2024 23:42
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from dc55106 to 0eeeecf Compare February 22, 2024 22:14
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from 369eaae to e8c0564 Compare March 4, 2024 19:46
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from abdeb0a to cb6d483 Compare March 11, 2024 18:24
@jwiegley jwiegley force-pushed the last-known-good branch 2 times, most recently from 19bf2c3 to c87d6d0 Compare March 19, 2024 18:57
@jwiegley jwiegley force-pushed the last-known-good branch 4 times, most recently from e047846 to 45ea210 Compare April 5, 2024 17:49
@jwiegley jwiegley force-pushed the last-known-good branch 4 times, most recently from 778e918 to 601ba92 Compare April 11, 2024 21:28
@jwiegley jwiegley force-pushed the last-known-good branch 4 times, most recently from 93256ce to 50dfe5f Compare May 8, 2024 00:20
@jwiegley jwiegley force-pushed the last-known-good branch 4 times, most recently from a86b765 to d6debba Compare May 23, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant