{"id":"CVE-2022-23517","published":"2022-12-14T16:10:22Z","modified":"2025-11-03T21:45:57Z","title":"Inefficient Regular Expression Complexity in 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. Certain configurations of rails-html-sanitizer < 1.4.4 use an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize certain SVG attributes. This may lead to a denial of service through CPU resource consumption. This issue has been patched in version 1.4.4.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01586,"percentile":0.76191,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979","tags":["x_refsource_MISC"]},{"url":"https://hackerone.com/reports/1684163","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":20.5,"factors":[{"name":"EPSS percentile","points":15.24},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"rails","affectedVersions":[{"vendor":"rails","product":"rails-html-sanitizer","versions":["< 1.4.4"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2024-02-02T17:07:58.712366Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"rails-html-sanitizer","vulnerableRanges":["<1.4.4"],"patched":["1.4.4"],"from":["GHSA-5x79-w82f-gw8w"],"provenance":"source"}],"summary":{"text":"The flaw is an inefficient regular expression in the rails-html-sanitizer component of the rails-html-sanitizer product, which is used to sanitize HTML fragments in Rails applications. An attacker with network access and no authentication or user interaction can trigger excessive backtracking by submitting crafted SVG attributes, but only when the library is used in certain configurations, causing a denial of service through CPU exhaustion.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:20Z"},"euvd":{"id":"EUVD-2022-7520","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rails-html-sanitizer-cve-2015-7579","parents":[{"from":"CVE-2015-7579","to":"CVE-2022-23517","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/49dfc1584c5b8e35a4ffabf8356ba3df025e8d3f","https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979"],"basis":"shared function","functions":["scrub_attribute"]}]},{"from":"CVE-2018-3741","to":"CVE-2022-23517","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae","https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979"],"basis":"shared function","functions":["scrub_attribute"]}]}],"children":[{"from":"CVE-2022-23517","to":"CVE-2026-73648","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979","https://github.com/rails/rails-html-sanitizer/commit/74dcb8053e6da9921246ce71b06ad9fd65b19586"],"basis":"shared function","functions":["scrub_attribute"]}]}]}}