Read the docs

Shared scrubber state in rails-html-sanitizer enables XSS under concurrent calls

Priority LOW 21CWE-362Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

rails-html-sanitizer before 1.7.2 lets the HTML4 and HTML5 variants of Rails::HTML::SafeListSanitizer share one Rails::HTML::PermitScrubber without synchronization. In a multithreaded process, concurrent sanitize calls with different tags or attributes options can interleave, so one call uses another call's allowlist. A permissive call can then leave a script element or event-handler attribute in output meant for a stricter policy, enabling cross-site scripting (CWE-79) when rendered. Single-threaded applications, applications using one identical allowlist everywhere, and applications providing a separate scrubber are not affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

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.

Why it matters now

EPSS 0.00219 12th percentileScored 2026-11-16
Fix Fixed rails-html-sanitizer (rails): 1.7.2rails-html-sanitizer (RubyGems): 1.7.2

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
Railsrails-html-sanitizerbefore 1.7.21.7.2Patch availableCNA
—rails-html-sanitizer (RubyGems)before 1.7.21.7.2Patch availableGHSA-h7wh-q2qr-458c
  • rails-html-sanitizer VendorRails Affected before 1.7.2 Fixed in 1.7.2 Patch available CNA
  • rails-html-sanitizer (RubyGems) Vendor— Affected before 1.7.2 Fixed in 1.7.2 Patch available GHSA-h7wh-q2qr-458c

Remediation

Upgrade rails-html-sanitizer to version 1.7.2, which fixes this issue in both the rails and RubyGems package listings.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA rails-html-sanitizer (rails) Fixed in 1.7.2
  • Fix · GHSA-h7wh-q2qr-458c rails-html-sanitizer (RubyGems) Fixed in 1.7.2 Advisory →

Timeline

  1. 2026-11-13 Threatist record created from CVE-2026-128069
  2. 2026-11-13 Alias added: GHSA-h7wh-q2qr-458c
  3. 2026-11-13 Fix available: RubyGems/[email protected] · GHSA-h7wh-q2qr-458c
  4. 2026-11-13 CVSS score added · GHSA-h7wh-q2qr-458c
  5. 2026-11-13 Weakness changed · GHSA-h7wh-q2qr-458c
  6. 2026-11-13 6 new references · GHSA-h7wh-q2qr-458c

References

  • TI-2014-00124 Path traversal in Ruby on Rails lets remote attackers read files KEVCVSS 3.1HIGH 7.5
  • TI-2019-03828 File content disclosure in Rails Action View KEVCVSS 3.1HIGH 7.5
  • TI-2016-00672 Directory traversal in Rails Action View lets attackers read files KEVCVSS 3.1HIGH 7.5
  • TI-2019-03830 Command injection in Rails https://github.com/rails/rails CVSS 3.1CRITICAL 9.8
  • TI-2026-47043 Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing CVSS 4.0CRITICAL 9.5
  • TI-2025-18040 Command injection in Rails activestorage CVSS 4.0CRITICAL 9.2
See all 185 →

Sources