Inefficient Regular Expression Complexity Affecting ruby-redcloth package, versions <4.2.9-5ubuntu0.1~esm1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.86% (75th 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 Learn

Learn about Inefficient Regular Expression Complexity vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU1604-RUBYREDCLOTH-5670723
  • published22 Mar 2026
  • disclosed6 Jun 2023

Introduced: 6 Jun 2023

CVE-2023-31606  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Ubuntu:16.04 ruby-redcloth to version 4.2.9-5ubuntu0.1~esm1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby-redcloth package and not the ruby-redcloth package as distributed by Ubuntu. See How to fix? for Ubuntu:16.04 relevant fixed versions and status.

A Regular Expression Denial of Service (ReDoS) issue was discovered in the sanitize_html function of redcloth gem v4.0.0. This vulnerability allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.

CVSS Base Scores

version 3.1