Medium
Improper neutralization of data URIs allows XSS in rails-html-sanitizer
Type: advisorySources: OSV
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-23518
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 03:44 UTC · Revision 1
Source evidence
Improper neutralization of data URIs allows XSS in rails-html-sanitizer
core-osv · Original sourcePublished 14 Dec 2022, 16:22 UTC
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.
osv:CVE-2022-23518
Complete source record
{
"id": "82d1629869d0915c3b37918230ea2411eaf190575d23f16a57f1ec8f4af49380",
"url": "https://osv.dev/vulnerability/CVE-2022-23518",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Improper neutralization of data URIs allows XSS in rails-html-sanitizer",
"summary": "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.",
"evidence": "osv:CVE-2022-23518",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2022-23518",
"aliases": [
"CVE-2022-23518",
"GHSA-mcvf-2q2m-x72m"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/rails/rails-html-sanitizer",
"type": "GIT",
"events": [
{
"introduced": "5c4354db7524b1df891df0a3e29877ce9f7575ca"
},
{
"fixed": "fd63deaeb22e601237d4d4d12014e7ebd410ea9b"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "1.0.3"
},
{
"fixed": "1.4.4"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:rails:*:*",
"range": [
{
"introduced": "1.0.3"
},
{
"fixed": "1.4.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v1.4.3",
"v1.4.2",
"v1.4.1",
"v1.4.0",
"v1.3.0",
"v1.2.0",
"v1.1.0",
"v1.0.4",
"v1.0.3"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-23518.json"
}
}
],
"modified": "2026-10-28T02:30:49.771094116Z",
"provider": "osv",
"references": [
"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://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23518.json",
"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m",
"https://nvd.nist.gov/vuln/detail/CVE-2022-23518",
"https://github.com/rails/rails-html-sanitizer/issues/135"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23518.json"
}
},
"related_cves": [
{
"value": "CVE-2022-23518",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 517856,
"published_at": "2022-12-14T16:22:34.46+00:00"
}