{"id":"CVE-2022-23518","summary":"Improper neutralization of data URIs allows XSS in rails-html-sanitizer","details":"rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions \u003e= 1.0.3, \u003c 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah \u003e= 2.1.0. This issue is patched in version 1.4.4.","aliases":["GHSA-mcvf-2q2m-x72m"],"modified":"2026-11-15T02:45:25.020923876Z","published":"2022-12-14T16:22:34.460Z","related":["SUSE-SU-2023:3534-1","SUSE-SU-2023:3714-1","openSUSE-SU-2024:12769-1","openSUSE-SU-2024:14175-1","openSUSE-SU-2025:15125-1","openSUSE-SU-2026:10361-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23518.json"},"references":[{"type":"WEB","url":"https://hackerone.com/reports/1694173"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23518.json"},{"type":"ADVISORY","url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23518"},{"type":"REPORT","url":"https://github.com/rails/rails-html-sanitizer/issues/135"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/flavorjones/loofah","events":[{"introduced":"680f1655927867e50a082706908a8c4b9a63e28d"},{"fixed":"3f8806300089135f7832a59aa2689a6674d37897"}],"database_specific":{"extracted_events":[{"cpe":"cpe:2.3:a:loofah_project:loofah:*:*:*:*:*:ruby:*:*","range":[{"introduced":"2.1.0"},{"fixed":"2.19.1"}],"source":"CPE_RANGE"}]}},{"type":"GIT","repo":"https://github.com/rails/rails-html-sanitizer","events":[{"introduced":"5c4354db7524b1df891df0a3e29877ce9f7575ca"},{"fixed":"fd63deaeb22e601237d4d4d12014e7ebd410ea9b"}],"database_specific":{"extracted_events":[{"strategy":"StringRangeExpression","range":[{"introduced":"1.0.3"},{"fixed":"1.4.4"}],"source":"AFFECTED_FIELD"},{"source":"CPE_RANGE","cpe":"cpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:rails:*:*","range":[{"introduced":"1.0.3"},{"fixed":"1.4.4"}]}]}}],"versions":["v2.19.0","v2.18.0","v2.17.0","v2.16.0","v2.15.0","v2.14.0","v2.13.0","v2.12.0","v2.11.0","v2.10.0","v2.9.1","v2.9.0","v2.8.0","v2.7.0","v2.6.0","v2.5.0","v2.4.0","v2.3.1","v2.3.0","v2.2.2","v2.2.1","v2.2.0","v2.1.1","v2.1.0","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"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}