Vulnerability · Published Dec 14, 2022 · Assigned by GitHub_M
CVE-2022-23516Uncontrolled Recursion in Loofah
High 7.5
In plain English
A high-severity security flaw in loofah from flavorjones. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 67% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah >= 2.2.0, < 2.19.1 uses recursion for sanitizing CDATA sections, making it susceptible to stack exhaustion and raising a SystemStackError exception. This may lead to a denial of service through CPU resource consumption. This issue is patched in version 2.19.1. Users who are unable to upgrade may be able to mitigate this vulnerability by limiting the length of the strings that are sanitized.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-loofah | 2.19.1-1 | DEBIAN-CVE-2022-23516 |
| Debian:13 | ruby-loofah | 2.19.1-1 | DEBIAN-CVE-2022-23516 |
| Debian:14 | ruby-loofah | 2.19.1-1 | DEBIAN-CVE-2022-23516 |
| RubyGems | loofah | 2.19.1 | GHSA-3x8r-x6xp-q4vm |
| Ubuntu:22.04:LTS | ruby-loofah | no fix listed | UBUNTU-CVE-2022-23516 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| flavorjones | loofah | >= 2.2.0, < 2.19.1 |
Weakness: CWE-674 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H