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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.2%top 32.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12ruby-loofah2.19.1-1DEBIAN-CVE-2022-23516
Debian:13ruby-loofah2.19.1-1DEBIAN-CVE-2022-23516
Debian:14ruby-loofah2.19.1-1DEBIAN-CVE-2022-23516
RubyGemsloofah2.19.1GHSA-3x8r-x6xp-q4vm
Ubuntu:22.04:LTSruby-loofahno fix listedUBUNTU-CVE-2022-23516

Affected products (as reported)

VendorProductVersions
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

References