{"schemaVersion":3,"id":"CVE-2022-23518","aliases":["UBUNTU-CVE-2022-23518","DEBIAN-CVE-2022-23518","GHSA-mcvf-2q2m-x72m"],"status":"published","duplicateOf":null,"title":null,"description":"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.","dates":{"published":"2022-12-14T16:22:34.460Z","modified":"2025-11-03T21:45:59.030Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.0","versionLabel":"v3.0","source":"CVE.org","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"CVE.org","score":6.1,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Ubuntu","score":6.1,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00925,"percentile":0.59804,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.05799999999999989,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00867},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00925,"percentile":0.59804}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00867,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00892,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00925,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00925,"percentile":0.59804}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_RAILS_RAILS-HTML-SANITIZER","name":"Rails Html Sanitizer","source":"github","url":"https://github.com/rails/rails-html-sanitizer/issues/135","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"debian","product":"ruby-rails-html-sanitizer","name":"ruby-rails-html-sanitizer","label":"ruby-rails-html-sanitizer","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby-rails-html-sanitizer","purlType":"deb","versions":[{"text":"< 1.4.4-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.4.4-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby-rails-html-sanitizer","name":"ruby-rails-html-sanitizer","label":"ruby-rails-html-sanitizer","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-rails-html-sanitizer","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"10.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"10.0","eol":{"isEol":true,"eolDate":"2024-06-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"10","label":"10 (Buster)","eolFrom":"2024-06-30T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"10.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"RubyGems","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/rails-html-sanitizer","purlType":"gem","versions":[{"text":"≥ 1.0.3, < 1.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.3, < 1.4.4","eol":null,"hubHref":null},{"vendor":"loofah_project","product":"loofah","name":"loofah","label":"loofah","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 2.1.0, < 2.19.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 2.1.0, < 2.19.1","eol":null,"hubHref":"/vendor/loofah_project/loofah"},{"vendor":"rails","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.3, < 1.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.3, < 1.4.4","eol":null,"hubHref":"/vendor/rails/rails-html-sanitizer"},{"vendor":"rubyonrails","product":"rails_html_sanitizers","name":"rails html sanitizers","label":"rails_html_sanitizers","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.3, < 1.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.3, < 1.4.4","eol":null,"hubHref":"/vendor/rubyonrails/rails_html_sanitizers"}],"affectedCount":7,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","label":"github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Third Party Advisory"]},{"url":"https://github.com/rails/rails-html-sanitizer/issues/135","label":"github.com/rails/rails-html-sanitizer/issues/135","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Exploit","Issue Tracking","Third Party Advisory"]},{"url":"https://hackerone.com/reports/1694173","label":"hackerone.com/reports/1694173","hostname":"hackerone.com","tags":["X Refsource MISC","REPORT","WEB","Permissions Required","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html","label":"lists.debian.org/debian-lts-announce/2023/09/msg00012.html","hostname":"lists.debian.org","tags":["WEB","Mailing List","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html","label":"lists.debian.org/debian-lts-announce/2024/09/msg00045.html","hostname":"lists.debian.org","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2022-23518","label":"ubuntu.com/security/CVE-2022-23518","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23518","label":"www.cve.org/CVERecord?id=CVE-2022-23518","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-23518","label":"security-tracker.debian.org/tracker/CVE-2022-23518","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23518","label":"nvd.nist.gov/vuln/detail/CVE-2022-23518","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/w3c/svgwg/issues/266","label":"github.com/w3c/svgwg/issues/266","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/rails/rails-html-sanitizer","label":"github.com/rails/rails-html-sanitizer","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23518.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23518.yml","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["DLA-3566-1","DLA-3902-1","OPENSUSE-SU-2024:12769-1","OPENSUSE-SU-2024:14175-1","OPENSUSE-SU-2025:15125-1","OPENSUSE-SU-2026:10361-1","RHSA-2023:2097","SUSE-SU-2023:3534-1","SUSE-SU-2023:3714-1"],"duplicates":[],"related":["OPENSUSE-SU-2024:12769-1","OPENSUSE-SU-2024:14175-1","OPENSUSE-SU-2025:15125-1","OPENSUSE-SU-2026:10361-1","SUSE-SU-2023:3534-1","SUSE-SU-2023:3714-1"]},"timeline":[{"kind":"published","date":"2022-12-14T16:22:34.460Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-03T21:45:59.030Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":35,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T22:20:47.516Z","stale":false,"partial":false}}