mberlanda / cheidelacoriera

This Rails application aims to become a management system for away fans.
GNU General Public License v3.0
2 stars 1 forks source link

chore(deps): update dependency rails-html-sanitizer to v1.4.4 [security] - autoclosed #245

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Update Change
rails-html-sanitizer (changelog) patch 1.4.3 -> 1.4.4

GitHub Vulnerability Alerts

CVE-2022-23518

Summary

rails-html-sanitizer >= 1.0.3, < 1.4.4 is vulnerable to cross-site scripting via data URIs when used in combination with Loofah >= 2.1.0.

Mitigation

Upgrade to rails-html-sanitizer >= 1.4.4.

Severity

The maintainers have evaluated this as Medium Severity 6.1.

References

Credit

This vulnerability was independently reported by Maciej Piechota (@​haqpl) and Mrinmoy Das (@​goromlagche).

CVE-2022-23520

Summary

There is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer. This is due to an incomplete fix of CVE-2022-32209.

Impact

A possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both "select" and "style" elements.

Code is only impacted if allowed tags are being overridden using either of the following two mechanisms:

  1. Using the Rails configuration config.action_view.sanitized_allow_tags=:

    # In config/application.rb
    config.action_view.sanitized_allowed_tags = ["select", "style"]

    (see https://guides.rubyonrails.org/configuring.html#configuring-action-view)

  2. Using the class method Rails::Html::SafeListSanitizer.allowed_tags=:

    # class-level option
    Rails::Html::SafeListSanitizer.allowed_tags = ["select", "style"]

All users overriding the allowed tags by either of the above mechanisms to include both "select" and "style" should either upgrade or use one of the workarounds immediately.

NOTE: Code is not impacted if allowed tags are overridden using either of the following mechanisms:

Workarounds

Remove either "select" or "style" from the overridden allowed tags.

References

Credit

This vulnerability was responsibly reported by Dominic Breuker.

CVE-2022-23519

Summary

There is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer.

Impact

A possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags in either of the following ways:

Code is only impacted if allowed tags are being overridden. Applications may be doing this in four different ways:

  1. using application configuration:

    # In config/application.rb
    config.action_view.sanitized_allowed_tags = ["math", "style"]
    # or
    config.action_view.sanitized_allowed_tags = ["svg", "style"]

    see https://guides.rubyonrails.org/configuring.html#configuring-action-view

  2. using a :tags option to the Action View helper sanitize:

    <%= sanitize @&#8203;comment.body, tags: ["math", "style"] %>
    <%# or %>
    <%= sanitize @&#8203;comment.body, tags: ["svg", "style"] %>

    see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitize

  3. using Rails::Html::SafeListSanitizer class method allowed_tags=:

    # class-level option
    Rails::Html::SafeListSanitizer.allowed_tags = ["math", "style"]
    # or
    Rails::Html::SafeListSanitizer.allowed_tags = ["svg", "style"]
  4. using a :tags options to the Rails::Html::SafeListSanitizer instance method sanitize:

    # instance-level option
    Rails::Html::SafeListSanitizer.new.sanitize(@&#8203;article.body, tags: ["math", "style"])
    # or
    Rails::Html::SafeListSanitizer.new.sanitize(@&#8203;article.body, tags: ["svg", "style"])

All users overriding the allowed tags by any of the above mechanisms to include (("math" or "svg") and "style") should either upgrade or use one of the workarounds immediately.

Workarounds

Remove "style" from the overridden allowed tags, or remove "math" and "svg" from the overridden allowed tags.

References

Credit

This vulnerability was responsibly reported by Dominic Breuker.

CVE-2022-23517

Summary

Certain configurations of rails-html-sanitizer < 1.4.4 use an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize certain SVG attributes. This may lead to a denial of service through CPU resource consumption.

Mitigation

Upgrade to rails-html-sanitizer >= 1.4.4.

Severity

The maintainers have evaluated this as High Severity 7.5 (CVSS3.1).

References

Credit

This vulnerability was responsibly reported by @​ooooooo-q (https://github.com/ooooooo-q).


Release Notes

rails/rails-html-sanitizer (rails-html-sanitizer) ### [`v1.4.4`](https://togithub.com/rails/rails-html-sanitizer/blob/HEAD/CHANGELOG.md#144--2022-12-13) [Compare Source](https://togithub.com/rails/rails-html-sanitizer/compare/v1.4.3...v1.4.4) - Address inefficient regular expression complexity with certain configurations of Rails::Html::Sanitizer. Fixes CVE-2022-23517. See [GHSA-5x79-w82f-gw8w](https://togithub.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w) for more information. *Mike Dalessio* - Address improper sanitization of data URIs. Fixes CVE-2022-23518 and [#​135](https://togithub.com/rails/rails-html-sanitizer/issues/135). See [GHSA-mcvf-2q2m-x72m](https://togithub.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m) for more information. *Mike Dalessio* - Address possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer. Fixes CVE-2022-23520. See [GHSA-rrfc-7g8p-99q8](https://togithub.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8) for more information. *Mike Dalessio* - Address possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer. Fixes CVE-2022-23519. See [GHSA-9h9g-93gc-623h](https://togithub.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h) for more information. *Mike Dalessio*

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 has been generated by Mend Renovate. View repository job log here.