{"id":"CVE-2022-23520","published":"2022-12-14T17:07:31Z","modified":"2025-11-03T21:46:02Z","title":"rails-html-sanitizer contains an incomplete fix for an XSS vulnerability","vendor":"rails","product":"rails-html-sanitizer","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01209,"percentile":0.69156,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8","tags":["x_refsource_CONFIRM"]},{"url":"https://hackerone.com/reports/1654310","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html","tags":[]}],"priority":{"score":18.1,"factors":[{"name":"EPSS percentile","points":13.83},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"rails","affectedVersions":[{"vendor":"rails","product":"rails-html-sanitizer","versions":["< 1.4.4"]}],"affected":[{"ecosystem":"RubyGems","package":"rails-html-sanitizer","vulnerableRanges":["<1.4.4"],"patched":["1.4.4"],"from":["GHSA-rrfc-7g8p-99q8"],"provenance":"source"}],"summary":{"text":"An incomplete fix for an XSS flaw exists in rails-html-sanitizer, the Rails library that sanitizes HTML fragments, in versions before 1.4.4 when an application overrides the allowed tags to permit both \"select\" and \"style\" elements. An attacker can inject script content via crafted HTML that is rendered in a victim's browser, requiring network access and that a user interact with the affected content, and only applications that override the sanitizer's allowed tags in this way are affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:40:24Z"},"euvd":{"id":"EUVD-2022-7739","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rails-html-sanitizer-cve-2022-32209","parents":[{"from":"CVE-2022-32209","to":"CVE-2022-23520","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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.","from":"CVE.org","in":"CVE-2022-23520"},{"kind":"similar","provenance":"machine","score":0.39,"basis":"same package + description similarity"}]}]}}