Skip to content
OpenAdvisories
Low · 2.3 CVE-2024-53987 EUVD-2024-3413GHSA-2x5m-9ch4-qgrr

Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0

Published Dec 2, 2024 · Updated Dec 3, 2024 · Assigned by GitHub_M

Description

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. There is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0. A possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags where the "style" element is explicitly allowed and the "svg" or "math" element is not allowed. This vulnerability is fixed in 1.6.1.

Affected products

VendorProductAffectedFixed
rails rails-html-sanitizer >= 1.6.0, < 1.6.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 ruby-rails-html-sanitizer No fix yet —
Ubuntu 26.04 LTS ruby-rails-html-sanitizer No fix yet —
Ubuntu 25.10 ruby-rails-html-sanitizer No fix yet —
Ubuntu 24.04 LTS ruby-rails-html-sanitizer No fix yet —
Ubuntu 22.04 LTS ruby-rails-html-sanitizer No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS ruby-rails-html-sanitizer No fix yet —
Ubuntu 18.04 LTS ruby-rails-html-sanitizer No fix yet —
Ubuntu 16.04 LTS ruby-rails-html-sanitizer No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed rubygem-rails-html-sanitizer 1.7.0-1.1 openSUSE-SU-2026:10569-1

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems rails-html-sanitizer >= 1.6.0, < 1.6.1 1.6.1 GHSA-2x5m-9ch4-qgrr

Advisories 2

References