CVE-2022-23518
MEDIUM 6.1CVSS 3.1Improper neutralization of data URIs may allow XSS in rails-html-sanitizer
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.
- Published
- 14 Dec 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-mcvf-2q2m-x72m
- Sources
- NVDJSONOSV GHSA-mcvf-2q2m-x72mJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.0 | MEDIUM 6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | rails_html_sanitizerscpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:rails:*:* |
>= 1.0.3, < 1.4.4 | 1.4.4 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | loofah_project | loofahcpe:2.3:a:loofah_project:loofah:*:*:*:*:*:ruby:*:* |
>= 2.1.0, < 2.19.1 | 2.19.1 |
| OSV | RubyGems | rails-html-sanitizer | >= 1.0.3, < 1.4.4 | 1.4.4 |
References
- https://github.com/rails/rails-html-sanitizer/issues/135 · Exploit, Issue Tracking, Third Party Advisory, WEB
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m · Third Party Advisory, WEB
- https://hackerone.com/reports/1694173 · Permissions Required, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html · Mailing List, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-23518 · ADVISORY
- https://github.com/w3c/svgwg/issues/266 · WEB
- https://github.com/rails/rails-html-sanitizer · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23518.yml · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 14 Dec 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 13 Dec 2022)