CVE-2022-23518
mediumpriority · track · 24EPSS 0.009 · 60 %ileDEEURUUSEPSS · scored 2026-10-27
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.
remediations
Vendor fix, mitigation, or workaround guidance, as published by each source.
A vendor fix is available.
- Fixedruby4.0-rubygem-rails-html-sanitizer-0:1.6.0-1.9.aarch64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedruby4.0-rubygem-rails-html-sanitizer-0:1.6.0-1.9.ppc64le as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedruby4.0-rubygem-rails-html-sanitizer-0:1.6.0-1.9.s390x as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedruby4.0-rubygem-rails-html-sanitizer-0:1.6.0-1.9.x86_64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5.6–7.1
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (11)
Products and version ranges known to be affected.
- rubyonrails rails html sanitizers1.0.3 → 1.4.4nvdUScpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:*:*:*
advisories (4)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2023-0266genua genucenter: Mehrere Schwachstellen ermöglichen nicht spezifizierten AngriffDeutsch2023-02-02csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in genua genucenter ausnutzen, um einen nicht näher spezifizierten Angriff durchzuführen.
- WID-SEC-W-2023-1143Red Hat Satellite: Mehrere SchwachstellenDeutsch2023-05-03csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Red Hat Satellite ausnutzen, um beliebigen Programmcode auszuführen, Informationen offenzulegen, einen Cross-Site-Scripting-Angriff durchzuführen oder einen Denial of Service Zustand herbeizuführen.
- openSUSE-SU-2026:10361-1ruby4.0-rubygem-rails-html-sanitizer-1.6.0-1.9 on GA media2026-03-13csaf · suse_csafDE
ruby4.0-rubygem-rails-html-sanitizer-1.6.0-1.9 on GA media
- GHSA-mcvf-2q2m-x72mImproper neutralization of data URIs may allow XSS in rails-html-sanitizer2022-12-13ghsa · osvUS
## Summary rails-html-sanitizer `>= 1.0.3, < 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `>= 2.1.0`. ## Mitigation Upgrade to rails-html-sanitizer `>= 1.4.4`. ## Severity The maintainers have evaluated this as [Medium Severity 6.1](https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N). ## References - [CWE - CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (4.9)](https://cwe.mitre.org/data/definitions/79.html) - [SVG MIME Type (image/svg+xml) is misleading to developers · Issue #266 · w3c/svgwg](https://github.com/w3c/svgwg/issues/266) - https://github.com/rails/rails-html-sanitizer/issues/135 - https://hackerone.com/reports/1694173 ## Credit This vulnerability was independently reported by Maciej Piechota (@haqpl) and Mrinmoy Das (@goromlagche).
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (16)
External citations — patches, advisories, analysis.
- https://cxsecurity.com/cveshow/CVE-2022-23518/cnnvd
- https://github.com/rails/rails-html-sanitizer/issues/135cnnvd
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8wPatchcnnvd
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72mcnnvd
- https://hackerone.com/reports/1694173cnnvd
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.htmlcnnvd
- https://www.auscert.org.au/bulletins/ESB-2023.5105cnnvd
- https://github.com/rails/rails-html-sanitizer/issues/135enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan