{"schemaVersion":3,"id":"CVE-2022-23520","aliases":["UBUNTU-CVE-2022-23520","DEBIAN-CVE-2022-23520","GHSA-rrfc-7g8p-99q8"],"status":"published","duplicateOf":null,"title":null,"description":"rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, there is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer due to an incomplete fix of CVE-2022-32209. Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both \"select\" and \"style\" elements. Code is only impacted if allowed tags are being overridden. This issue is patched in version 1.4.4. All users overriding the allowed tags to include both \"select\" and \"style\" should either upgrade or use this workaround: Remove either \"select\" or \"style\" from the overridden allowed tags. NOTE: Code is _not_ impacted if allowed tags are overridden using either the :tags option to the Action View helper method sanitize or the :tags option to the instance method SafeListSanitizer#sanitize.","dates":{"published":"2022-12-14T17:07:31.954Z","modified":"2025-11-03T21:46:02.126Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","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.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.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}]},"epss":{"probability":0.01185,"percentile":0.67368,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.0749999999999999,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.0111},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01185,"percentile":0.67368}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0111,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01142,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01185,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01185,"percentile":0.67368}]},"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},{"id":"REF_60038688CE10ADC4","name":"Exploit Reference (hackerone.com)","source":"reference","url":"https://hackerone.com/reports/1654310","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":2,"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.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.4.4","eol":null,"hubHref":null},{"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.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 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.4.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.4.4","eol":null,"hubHref":"/vendor/rubyonrails/rails_html_sanitizers"}],"affectedCount":6,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8","label":"github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Exploit","Third Party Advisory"]},{"url":"https://hackerone.com/reports/1654310","label":"hackerone.com/reports/1654310","hostname":"hackerone.com","tags":["X Refsource MISC","REPORT","WEB","Exploit","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-23520","label":"ubuntu.com/security/CVE-2022-23520","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23520","label":"www.cve.org/CVERecord?id=CVE-2022-23520","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-23520","label":"security-tracker.debian.org/tracker/CVE-2022-23520","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23520","label":"nvd.nist.gov/vuln/detail/CVE-2022-23520","hostname":"nvd.nist.gov","tags":["Advisory"]},{"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-23520.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23520.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-14T17:07:31.954Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-03T21:46:02.126Z","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-19T19:12:52.457Z","stale":false,"partial":false}}