{"id":"CVE-2022-23519","published":"2022-12-14T16:50:14Z","modified":"2025-11-03T21:46:00Z","title":"Possible XSS vulnerability with certain configurations of rails-html-sanitizer","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, a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags in either of the following ways: allow both \"math\" and \"style\" elements,  or allow both \"svg\" and \"style\" elements. Code is only impacted if allowed tags are being overridden. . This issue is fixed in version 1.4.4. All users overriding the allowed tags to include \"math\" or \"svg\" and \"style\" should either upgrade or use the following workaround immediately: Remove \"style\" from the overridden allowed tags, or remove \"math\" and \"svg\" from the overridden allowed tags.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01076,"percentile":0.6582,"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-9h9g-93gc-623h","tags":["x_refsource_CONFIRM"]},{"url":"https://hackerone.com/reports/1656627","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.2,"factors":[{"name":"EPSS percentile","points":13.16},{"name":"CVSS severity","points":5.04}]},"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-9h9g-93gc-623h"],"provenance":"source"}],"summary":{"text":"The rails-html-sanitizer library, used by Rails applications to sanitize HTML fragments, contains a cross-site scripting flaw in versions before 1.4.4 that only affects applications which override the default allowed tags so that both \"math\" or \"svg\" and \"style\" are permitted. An attacker who can supply HTML that the application sanitizes over the network, without authentication or user interaction, can inject script content into the output when the library is configured this way, with a low-complexity attack and a scope change affecting confidentiality and integrity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:49Z"},"euvd":{"id":"EUVD-2022-7583","exploited":false,"provenance":"source"}}