{"id":"CVE-2022-23514","published":"2022-12-14T13:19:25Z","modified":"2025-11-03T21:45:53Z","title":"Inefficient Regular Expression Complexity in Loofah","vendor":"flavorjones","product":"loofah","tier":"tail","description":{"text":"Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah < 2.19.1 contains 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 is patched in version 2.19.1.","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.01889,"percentile":0.80093,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-486f-hjj9-9vhh","tags":["x_refsource_CONFIRM"]},{"url":"https://hackerone.com/reports/1684163","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00044.html","tags":[]}],"priority":{"score":21.3,"factors":[{"name":"EPSS percentile","points":16.02},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"flavorjones","affectedVersions":[{"vendor":"flavorjones","product":"loofah","versions":["< 2.19.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-21T14:49:18.392624Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"loofah","vulnerableRanges":["<2.19.1"],"patched":["2.19.1"],"from":["GHSA-486f-hjj9-9vhh"],"provenance":"source"}],"summary":{"text":"Loofah, a Ruby library for manipulating and sanitizing HTML/XML built on Nokogiri, contains an inefficient regular expression used when sanitizing certain SVG attributes. An unauthenticated remote attacker with network access can trigger excessive backtracking by submitting crafted input for sanitization, with no user interaction or special configuration required, causing denial of service through CPU exhaustion.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:11:18Z"},"euvd":{"id":"EUVD-2022-7500","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-flavorjones-loofah-cve-2018-8048","parents":[{"from":"CVE-2018-8048","to":"CVE-2022-23514","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/loofah/html5/scrub.rb"],"commits":["https://github.com/flavorjones/loofah/commit/f739cf8eac5851f328b8044281d6653f74eff116","https://github.com/flavorjones/loofah/commit/a6e0a1ab90675a17b1b2be189129d94139e4b143"],"basis":"shared function","functions":["scrub_attributes","scrub_css"]}]}],"children":[{"from":"CVE-2022-23514","to":"CVE-2022-23516","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/loofah/html5/scrub.rb"],"commits":["https://github.com/flavorjones/loofah/commit/a6e0a1ab90675a17b1b2be189129d94139e4b143","https://github.com/flavorjones/loofah/commit/86f7f6364491b0099d215db858ecdc0c89ded040"],"basis":"rarely changed file"}]}]}}