CVE-2022-23516: Uncontrolled Recursion in Loofah
Vulnerability summary
CVE-2022-23516 is a high (CVSS 7.5) Uncontrolled Recursion vulnerability in flavorjones loofah. EPSS estimates a 1.17% chance of exploitation in the next 30 days, higher than 67.3% of scored vulnerabilities.
Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 8 · Related 5Timeline
- 14-12-2022PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · RubygemsEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
1.17%
Chance of exploitation in the next 30 days
Percentile
67%
Versus all other CVEs
30-day change
Increase +0.04 pp
From 1.13% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- ruby-loofah< 2.19.1-1
Flavorjones1 product
- loofah≥ 2.2.0, < 2.19.1
Loofah_project1 product
- loofah≥ 2.2.0, < 2.19.1
RubyGems1 product
- loofah≥ 2.2.0, < 2.19.1
Ubuntu1 product
- ruby-loofahAll versions (No fix recorded)
5 vendors · 5 products
References
10 links- github.com/flavorjones/loofah/security/advisories/GHSA-3x8r-x6xp-q4vmX Refsource CONFIRMREPORTWEBThird Party Advisory