CVE-2022-23520: rails-html-sanitizer contains an incomplete fix for an XSS vulnerability
Vulnerability summary
CVE-2022-23520 is a medium (CVSS 6.1) vulnerability in debian debian_linux. EPSS estimates a 1.21% chance of exploitation in the next 30 days, higher than 69.4% of scored vulnerabilities. 2 public exploits are recorded.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 10 · Related 7Timeline
- 14-12-2022PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · RubygemsEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
1.21%
Chance of exploitation in the next 30 days
Percentile
69%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 1.19% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
2 foundRails Html Sanitizer
Maturity: poc
Exploit Reference (hackerone.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian2 products
- ruby-rails-html-sanitizer< 1.4.4-1
- debian_linuxEOL10.0
Rails1 product
- rails-html-sanitizer< 1.4.4
RubyGems1 product
- rails-html-sanitizer< 1.4.4
Rubyonrails1 product
- rails_html_sanitizers< 1.4.4
Ubuntu1 product
- ruby-rails-html-sanitizerAll versions (No fix recorded) | < 1.0.3-2ubuntu0.1~esm1 | < 1.0.4-1ubuntu0.1~esm1 | < 1.3.0-1ubuntu0.1~esm1 | < 1.4.2-2ubuntu0.1~esm1
5 vendors · 6 products
References
11 links- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8X Refsource CONFIRMREPORTWEBExploitThird Party Advisory