NetSight
medium4.7

CVE-2026-128069

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications.

Impact

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Before 1.7.2, the HTML4 and HTML5 variants of Rails::HTML::SafeListSanitizer reuse one Rails::HTML::PermitScrubber across calls and mutate its tags and attributes without synchronization. In a multithreaded process, concurrent sanitize calls using different tags: or attributes: options can interleave and cause one call to use the other call's allowlist. If a permissive call admits a script element or event-handler attribute, output expected to be sanitized under a stricter policy can retain it and cause cross-site scripting when rendered. Applications that are single-threaded, use one identical allowlist everywhere, or provide a separate scrubber: are not affected. This issue is fixed in version 1.7.2.

An attacker can exploit this over the network, without logging in, but a user has to do something, such as open a file or a link. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of data being read, low risk of data or systems being changed. The attack can reach beyond the vulnerable component itself.

Affected packages

EcosystemPackageAffectedFixed in
rubygemsrails-html-sanitizer< 1.7.21.7.2

Affected products · Rails

ProductAffected versions
Rails-html-sanitizer
before 1.7.2
Version < 1.7.2

Weakness classification

References