CVE-2022-23518: Improper neutralization of data URIs allows XSS in rails-html-sanitizer
Vulnerability summary
CVE-2022-23518 is a medium (CVSS 6.1) vulnerability in debian debian_linux. EPSS estimates a 0.94% chance of exploitation in the next 30 days, higher than 62.2% of scored vulnerabilities. 1 public exploit is 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. Versions >= 1.0.3, < 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah >= 2.1.0. This issue is patched in version 1.4.4.
CVSS metrics
7 scores · 5 sources · 2 versions- 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
- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.94%
Chance of exploitation in the next 30 days
Percentile
62%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 0.92% 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
1 foundRails Html Sanitizer
Maturity: poc
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
Loofah_project1 product
- loofah≥ 2.1.0, < 2.19.1
Rails1 product
- rails-html-sanitizer≥ 1.0.3, < 1.4.4
RubyGems1 product
- rails-html-sanitizer≥ 1.0.3, < 1.4.4
Rubyonrails1 product
- rails_html_sanitizers≥ 1.0.3, < 1.4.4
Ubuntu1 product
- ruby-rails-html-sanitizerAll versions (No fix recorded) | < 1.0.4-1ubuntu0.1~esm1 | < 1.3.0-1ubuntu0.1~esm1 | < 1.4.2-2ubuntu0.1~esm1
6 vendors · 7 products
References
13 links- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72mX Refsource CONFIRMREPORTWEBThird Party Advisory
- github.com/rails/rails-html-sanitizer/issues/135X Refsource MISCREPORTWEBExploitIssue TrackingThird Party Advisory