CVE-2022-23516 Uncontrolled Recursion in Loofah

High 7.5 Published Updated
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.

PackageAffectedFixed in
loofah RubyGemsFrom 2.2.02.19.1
loofah RubyGemsFrom 2.2.02.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.

Sources

Also known as DEBIAN-CVE-2022-23516, GHSA-3x8r-x6xp-q4vm, UBUNTU-CVE-2022-23516.

Is CVE-2022-23516 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free