# CVE-2022-23516: Uncontrolled Recursion in Loofah

Source: https://junglewise.ai/threats/cve-2022-23516-uncontrolled-recursion-in-loofah  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-12-13  
License: CC BY 4.0 with a link back

CVE-2022-23516 · Severity: low · CVSS 3.1 · Published 2022-12-13

Uncontrolled Recursion in Loofah

Technologies: [loofah (RubyGems)](https://junglewise.ai/threats/technologies/loofah). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2022-23516 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-23516 being exploited in the wild.

**How severe is CVE-2022-23516?** Low severity, with a CVSS score of 3.1, published 13 December 2022.

**Which products and versions are affected?** loofah (RubyGems) ECOSYSTEM:introduced=2.2.0,fixed=2.19.1.

**Is there a fix for CVE-2022-23516?** Yes. loofah (RubyGems): upgrade to 2.19.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-23516?** Check whether you run loofah (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- loofah (RubyGems): upgrade to 2.19.1 or later

  ```sh
  bundle update loofah
  ```


## Affected products

- loofah (RubyGems) ECOSYSTEM:introduced=2.2.0,fixed=2.19.1

## Identifiers

- CVE-2022-23516
- GHSA-3x8r-x6xp-q4vm

## Related threats

- [Loofah allowed_uri? XSS bypass via numeric character reference](https://junglewise.ai/threats/cve-2026-126209-loofah-is-a-general-library-for-manipulating-and-transforming)
- [Loofah SVG href sanitization bypass in textPath and mpath](https://junglewise.ai/threats/cve-2026-126208-loofah-is-a-general-library-for-manipulating-and-transforming)
- [Loofah CSS url() sanitization bypass via escaped parentheses](https://junglewise.ai/threats/cve-2026-126207-loofah-css-url-sanitization-bypass-via-escaped-parentheses)
- [Loofah HTML5 Scrub XSS bypass via HTML entity encoding in data URIs](https://junglewise.ai/threats/cve-2026-126206-loofah-allowed-uri-treats-data-text-sol-html-as-safe-text-plain)
- [Loofah regular expression denial of service in SVG local-reference check](https://junglewise.ai/threats/cve-2026-126205-loofah-regular-expression-denial-of-service-in-the-svg-local)
