{"id":"CVE-2022-23514","aliases":["CVE-2022-23514","GHSA-486f-hjj9-9vhh"],"related":[],"kind":"vulnerability","state":"published","title":"Inefficient Regular Expression Complexity in Loofah","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nLoofah `< 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.\n\n\n## Mitigation\n\nUpgrade to Loofah `>= 2.19.1`.\n\n\n## Severity\n\nThe Loofah maintainers have evaluated this as [High Severity 7.5 (CVSS3.1)](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).\n\n\n## References\n\n- [CWE - CWE-1333: Inefficient Regular Expression Complexity (4.9)](https://cwe.mitre.org/data/definitions/1333.html)\n- https://hackerone.com/reports/1684163\n\n\n## Credit\n\nThis vulnerability was responsibly reported by @ooooooo-q (https://github.com/ooooooo-q).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Loofah es una librería general para manipular y transformar documentos y fragmentos HTML / XML, construida sobre Nokogiri. Loofah &lt; 2.19.1 contiene una expresión regular ineficiente que es susceptible a un retroceso excesivo al intentar sanitizar ciertos atributos SVG. Esto puede provocar una denegación de servicio a través del consumo de recursos de CPU. Este problema está parcheado en la versión 2.19.1.","source":"nvd"}],"published":"2022-12-13T17:36:28.000Z","modified":"2026-06-17T04:30:16.610Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"< 2.19.1","status":"affected"}],"vendor":"flavorjones","product":"loofah","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.19.1"}],"ecosystem":"RubyGems","package":"loofah","purl":"pkg:gem/loofah","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.19.1"}],"vendor":"loofah_project","product":"loofah","cpe":"cpe:2.3:a:loofah_project:loofah:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-486f-hjj9-9vhh","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://hackerone.com/reports/1684163","tags":["permissions-required","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00044.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23514","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/flavorjones/loofah/commit/a6e0a1ab90675a17b1b2be189129d94139e4b143","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/flavorjones/loofah","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/CVE-2022-23514.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-04-21T14:49:18.392Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-23514","url":"https://www.cve.org/CVERecord?id=CVE-2022-23514","licence":"CVE Terms of Use","modified":"2025-11-03T21:45:53.018Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-486f-hjj9-9vhh","url":"https://github.com/advisories/GHSA-486f-hjj9-9vhh","licence":"CC-BY-4.0","modified":"2025-11-04T17:02:26.327Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-23514","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23514","licence":"Public domain","modified":"2026-06-17T04:30:16.610Z"}],"updatedAt":"2026-11-25T22:58:17.524Z","epss":{"score":0.01838,"percentile":0.79583,"date":"2026-12-01T12:00:22.000Z"}}