CVE-2022-23520 rails-html-sanitizer contains an incomplete fix for an XSS vulnerability
- Published
- Updated
- Exploit status
- Proof-of-concept only
- Technology
- UbuntuDebian
Description
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, there is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer due to an incomplete fix of CVE-2022-32209. 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. This issue is patched in version 1.4.4. All users overriding the allowed tags to include both "select" and "style" should either upgrade or use this workaround: Remove either "select" or "style" from the overridden allowed tags. NOTE: Code is not impacted if allowed tags are overridden using either the :tags option to the Action View helper method sanitize or the :tags option to the instance method SafeListSanitizer#sanitize.
Upgrade path
15 packages: 5 fixed, 8 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 16.04) | = 1.0.2-1; = 1.0.3-1; = 1.0.3-2; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 18.04) | = 1.0.3-2; = 1.0.4-1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 20.04) | = 1.0.4-1; = 1.3.0-1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 22.04) | = 1.3.0-2; = 1.4.2-1; = 1.4.2-2; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 24.04) | = 1.4.4-1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 25.10) | = 1.4.4-1; = 1.6.2-1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 26.04) | = 1.6.2-1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu 26.10) | = 1.6.2-1; = 1.7.0-2; = 1.7.1-1; All versions | No fix listed | No fix yet |
| debian/ruby-rails-html-sanitizer(Debian 12) | < 1.4.4-1 | 1.4.4-1 | Fixed |
| debian/ruby-rails-html-sanitizer(Debian 13) | < 1.4.4-1 | 1.4.4-1 | Fixed |
| debian/ruby-rails-html-sanitizer(Debian 14) | < 1.4.4-1 | 1.4.4-1 | Fixed |
| rubygems rails-html-sanitizer(RubyGems) | < 1.4.4; = 1.0.0; = 1.0.1; = 1.0.2 +9 more | 1.4.4 | Fixed |
| rubyonrails rails html sanitizers | < 1.4.4 | 1.4.4 | Fixed |
| debian linux | = 10.0 | No fix listed | Versions listed |
| rails-html-sanitizer | = < 1.4.4 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems rails-html-sanitizer(RubyGems) | < 1.4.4 | 1.4.4 |
| rubygems rails-html-sanitizer(RubyGems) | = 1.0.0 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.0.1 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.0.2 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.0.3 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.0.4 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.1.0 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.2.0 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.3.0 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.4.0 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.4.1 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.4.2 | No fix listed |
| rubygems rails-html-sanitizer(RubyGems) | = 1.4.3 | No fix listed |
| rails-html-sanitizer | = < 1.4.4 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:22.04) | All versions | No fix listed |
| rubyonrails rails html sanitizers | < 1.4.4 | 1.4.4 |
| debian linux | = 10.0 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.10) | All versions | No fix listed |
| debian/ruby-rails-html-sanitizer(Debian:12) | < 1.4.4-1 | 1.4.4-1 |
| debian/ruby-rails-html-sanitizer(Debian:14) | < 1.4.4-1 | 1.4.4-1 |
| debian/ruby-rails-html-sanitizer(Debian:13) | < 1.4.4-1 | 1.4.4-1 |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:16.04) | = 1.0.2-1 | No fix listed |
Show 19 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:16.04) | = 1.0.3-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:16.04) | = 1.0.3-2 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:18.04) | = 1.0.3-2 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:18.04) | = 1.0.4-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:20.04) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:20.04) | = 1.0.4-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:20.04) | = 1.3.0-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:22.04) | = 1.3.0-2 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:22.04) | = 1.4.2-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:22.04) | = 1.4.2-2 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:24.04) | = 1.4.4-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:25.10) | = 1.4.4-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:25.10) | = 1.6.2-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.10) | = 1.6.2-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.10) | = 1.7.0-2 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.10) | = 1.7.1-1 | No fix listed |
| ubuntu/ruby-rails-html-sanitizer(Ubuntu:26.04) | = 1.6.2-1 | No fix listed |
References
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8 exploit issue-tracking third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://hackerone.com/reports/1654310 exploit issue-tracking third-party-advisory
- github.com product
- github.com exploit
- lists.debian.org mailing-list third-party-advisory
- lists.debian.org
- Debian Security Tracker CVE-2022-23520 vendor-advisory
- github.com
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking