Shared scrubber state in rails-html-sanitizer enables XSS under concurrent calls
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
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Rails | rails-html-sanitizer | before 1.7.2 | 1.7.2 | Patch available | CNA |
| — | rails-html-sanitizer (RubyGems) | before 1.7.2 | 1.7.2 | Patch available | GHSA-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
- 2026-11-13 Threatist record created from CVE-2026-128069
- 2026-11-13 Alias added: GHSA-h7wh-q2qr-458c
- 2026-11-13 Fix available: RubyGems/[email protected] · GHSA-h7wh-q2qr-458c
- 2026-11-13 CVSS score added · GHSA-h7wh-q2qr-458c
- 2026-11-13 Weakness changed · GHSA-h7wh-q2qr-458c
- 2026-11-13 6 new references · GHSA-h7wh-q2qr-458c
References
Other 6
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-h7wh-q2qr-458c
- https://github.com/rails/rails-html-sanitizer/issues/228
- https://github.com/rails/rails-html-sanitizer/commit/15f764c3563d5dd9b97ad32eaa7454577ccec4b9
- https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2
- https://github.com/rails/rails-html-sanitizer
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/GHSA-h7wh-q2qr-458c.yml
More Rails vulnerabilities
- 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
Sources
- CVE-2026-128069 · CVE Program
- CVE-2026-128069 · NVD
- FIRST EPSS
- GHSA-h7wh-q2qr-458c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences