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


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.1% (43rd percentile)

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.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
7.5 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    High
Expand this section

NVD

7.5 high
Expand this section

Red Hat

7.5 high
Expand this section

SUSE

7.5 high