CVE-2022-23516 Uncontrolled Recursion in Loofah
- Exploited in the wild
- Not known
- Fix
- Available
What is CVE-2022-23516?
CVE-2022-23516 is a high-severity vulnerability in flavorjones loofah, published on 14 Dec 2022.
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.
Weakness: CWE-674
Which versions are affected by CVE-2022-23516?
2 open source packages ship an affected version, including loofah. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
loofah RubyGems | From 2.2.0 | 2.19.1 |
loofah RubyGems | From 2.2.0 | 2.19.1 |
Products include Loofah Project Loofah.
How do I fix CVE-2022-23516?
Upgrade loofah to 2.19.1 or later.
Is CVE-2022-23516 being exploited?
There is no known exploitation of CVE-2022-23516 in the wild and no public exploit code.
Other vulnerabilities in flavorjones loofah
Sources
Also known as DEBIAN-CVE-2022-23516, GHSA-3x8r-x6xp-q4vm, UBUNTU-CVE-2022-23516.