headlines
headlines copied to clipboard
[Security] Bump sanitize from 5.1.0 to 5.2.3
Bumps sanitize from 5.1.0 to 5.2.3. This update includes security fixes.
Vulnerabilities fixed
Sourced from The Ruby Advisory Database.
Cross-site scripting vulnerability via
<math>
or<svg>
element in Sanitize When HTML is sanitized using Sanitize's "relaxed" config or a custom config that allows certain elements, some content in aor
element may not be sanitized correctly even ifmath
andsvg
are not in the allowlist.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframe
math
noembed
noframes
noscript
plaintext
script
style
svg
xmp
Impact
Patched versions: >= 5.2.1 Unaffected versions: < 3.0.0
Sourced from The GitHub Security Advisory Database.
Cross-site Scripting in Sanitize When HTML is sanitized using Sanitize's "relaxed" config or a custom config that allows certain elements, some content in a
or
element may not be sanitized correctly even ifmath
andsvg
are not in the allowlist.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframe
math
noembed
noframes
noscript
plaintext
script
style
svg
xmp
Impact
Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser.
Releases
Affected versions: >= 3.0.0, < 5.2.1
Release notes
Sourced from sanitize's releases.
v5.2.3
Bug Fixes
v5.2.2
Bug Fixes
- Fixed a deprecation warning in Ruby 2.7+ when using keyword arguments in a custom transformer. [@mscrivo - #206]206
v5.2.1
Bug Fixes
Fixed an HTML sanitization bypass that could allow XSS. This issue affects Sanitize versions 3.0.0 through 5.2.0.
When HTML was sanitized using the "relaxed" config or a custom config that allows certain elements, some content in a
<math>
or<svg>
element may not have beeen sanitized correctly even ifmath
andsvg
were not in the allowlist. This could allow carefully crafted input to sneak arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site scripting) attack.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframe
math
noembed
noframes
noscript
plaintext
script
style
svg
xmp
See the security advisory for more details, including a workaround if you're not able to upgrade: GHSA-p4x4-rw2p-8j8m
Many thanks to Michał Bentkowski of Securitum for reporting this issue and helping to verify the fix.
v5.2.0
Changes
The term "whitelist" has been replaced with "allowlist" throughout Sanitize's source and documentation.
While the etymology of "whitelist" may not be explicitly racist in origin or intent, there are inherent racial connotations in the implication that white is good and black (as in "blacklist") is not.
This is a change I should have made long ago, and I apologize for not making it sooner.
In transformer input, the
:is_whitelisted
and:node_whitelist
keys are now deprecated. New:is_allowlisted
and:node_allowlist
keys have been added. The old keys will continue to work in order to avoid breaking existing code, but they are no longer documented and may be removed in a future semver major release.
Changelog
Sourced from sanitize's changelog.
5.2.3 (2021-01-11)
Bug Fixes
5.2.2 (2021-01-06)
Bug Fixes
- Fixed a deprecation warning in Ruby 2.7+ when using keyword arguments in a custom transformer. [@mscrivo - #206]206
5.2.1 (2020-06-16)
Bug Fixes
Fixed an HTML sanitization bypass that could allow XSS. This issue affects Sanitize versions 3.0.0 through 5.2.0.
When HTML was sanitized using the "relaxed" config or a custom config that allows certain elements, some content in a
<math>
or<svg>
element may not have beeen sanitized correctly even ifmath
andsvg
were not in the allowlist. This could allow carefully crafted input to sneak arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site scripting) attack.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframe
math
noembed
noframes
noscript
plaintext
script
style
svg
xmp
See the security advisory for more details, including a workaround if you're not able to upgrade: [GHSA-p4x4-rw2p-8j8m]
Many thanks to Michał Bentkowski of Securitum for reporting this issue and
Commits
9b8b55b
Release 5.2.3eaaaa9d
Clarify commentsfac1a2e
ensure protocol processing happens on data attributes4f6858f
Link the Tests badge to the workflow page1c661dc
Remove Traviscd68389
Add GitHub Actions workflow4ea3d8e
Release 5.2.27a7dd3e
Add Ruby 3.0 to the Travis matrix.361cc05
Fix warning in Ruby 2.7+b032474
Merge branch 'ajmalmsali-patch-1'- Additional commits viewable in compare view
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 -
@dependabot badge me
will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)