CVE-2023-31606 RedCloth Regular Expression Denial of Service issue

High 7.5 Published Updated

Attackers can cause a Denial of Service in applications using the redcloth gem by supplying crafted payloads to the sanitize_html function.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-31606?

CVE-2023-31606 is a high-severity denial of service vulnerability in n/a, published on 6 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-1333

Which versions are affected by CVE-2023-31606?

2 open source packages ship an affected version, including RedCloth. It affects 1 product.

PackageAffectedFixed in
RedCloth RubyGemsAll versions4.3.3
RedCloth RubyGemsAll versions4.3.3

Products include Promptworks Redcloth.

How do I fix CVE-2023-31606?

Upgrade RedCloth to 4.3.3 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-31606 being exploited?

There is no known exploitation of CVE-2023-31606 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2023-31606, DLA-3480-1, GHSA-qcm3-vfq5-wfr2, MGASA-2023-0291, UBUNTU-CVE-2023-31606, USN-6358-1.

Is CVE-2023-31606 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free