Uncontrolled Recursion Affecting loofah package, versions >=2.2.0, <2.19.1


0.0
high

Snyk CVSS

    Attack Complexity Low
    Availability High

    Threat Intelligence

    EPSS 0.09% (37th percentile)
Expand this section
NVD
7.5 high
Expand this section
Red Hat
7.5 high
Expand this section
SUSE
7.5 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUBY-LOOFAH-3168649
  • published 14 Dec 2022
  • disclosed 13 Dec 2022
  • credit Unknown

How to fix?

Upgrade loofah to version 2.19.1 or higher.

Overview

loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri.

Affected versions of this package are vulnerable to Uncontrolled Recursion when it uses recursion for sanitizing CDATA sections, making it susceptible to stack exhaustion and raising a SystemStackError exception, which might result in CPU resource consumption.

Workaround

Users who are unable to upgrade may be able to mitigate this vulnerability by limiting the length of the strings that are sanitized.