# CVE-2022-23518: Improper neutralization of data URIs allows XSS in rails-html-sanitizer

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-12-14 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2022-23518, DEBIAN-CVE-2022-23518, GHSA-mcvf-2q2m-x72m
- Record: https://cvemate.com/vulnerability/CVE-2022-23518 · JSON: https://cvemate.com/vulnerability/CVE-2022-23518/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.0, CVE.org) CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.944%, percentile 62.246%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- debian ruby-rails-html-sanitizer (Debian): \< 1.4.4-1
- ubuntu ruby-rails-html-sanitizer (Ubuntu): All versions (No fix recorded) \| \< 1.0.4-1ubuntu0.1~esm1 \| \< 1.3.0-1ubuntu0.1~esm1 \| \< 1.4.2-2ubuntu0.1~esm1
- debian debian\_linux: 10.0
- RubyGems rails-html-sanitizer (RubyGems): ≥ 1.0.3, \< 1.4.4
- loofah\_project loofah: ≥ 2.1.0, \< 2.19.1
- rails rails-html-sanitizer: ≥ 1.0.3, \< 1.4.4
- rubyonrails rails\_html\_sanitizers: ≥ 1.0.3, \< 1.4.4

## References

- <https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m>
- <https://github.com/rails/rails-html-sanitizer/issues/135>
- <https://hackerone.com/reports/1694173>
- <https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html>
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html>
- <https://ubuntu.com/security/CVE-2022-23518>
- <https://www.cve.org/CVERecord?id=CVE-2022-23518>
- <https://security-tracker.debian.org/tracker/CVE-2022-23518>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23518>
- <https://github.com/w3c/svgwg/issues/266>
- <https://github.com/rails/rails-html-sanitizer>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23518.yml>
- <https://ubuntu.com/security/notices/USN-9438-1>

---

Data as of 2026-12-05T13:12:04.875Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
