CVE-2023-31606 json
RedCloth Regular Expression Denial of Service issue
published 2023-06-06 3 y ago modified 2026-06-17 4 mo ago also GHSA-qcm3-vfq5-wfr2 , EUVD-2023-1866
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems RedCloth 4.3.3
- ruby-redcloth Debian 14, Debian 13 4.3.3-1
debian advisories DEBIAN-CVE-2023-31606
- ruby-redcloth Ubuntu 20.04 LTS 4.3.2-3+deb10u1build0.20.04.1
- ruby-redcloth Ubuntu 22.04 LTS 4.3.2-4ubuntu0.22.04.1
- ruby-redcloth Ubuntu Pro 16.04 LTS 4.2.9-5ubuntu0.1~esm1
- ruby-redcloth Ubuntu Pro 18.04 LTS 4.3.2-3ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2023-31606
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-31606 updated cvss 7.5
RedCloth: Regular expression denial of service in sanitize_html function
-
Red Hat 3scale API Management Platform 2 3scale-amp-system 3scale-amp-systemaffected: no fix available
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.51% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/jgarber/redcloth/issues/73 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/e23e/CVE-2023-31606#readme referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | RedCloth | <4.3.3 |
4.3.3 |
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/jgarber/redcloth/commit/8b1327688fef8e6617792054ef299d7bc74c0a1e
web
-
github.com
/jgarber/redcloth/issues/73
web, exploit, issue-tracking, third-party-advisory
-
github.com
/e23e/CVE-2023-31606#readme
web, exploit, third-party-advisory
-
security.gentoo.org
/glsa/202401-14
vendor-advisory, web
-
github.com
/jgarber/redcloth
package, product
-
lists.debian.org
/debian-lts-announce/2023/07/msg00002.html
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2023-31606
advisory
-
github.com
/jgarber/redcloth/blob/v4.3.2/lib/redcloth/formatters/html.rb#L327
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/RedCloth/CVE-2023-31606.yml
web
Sources
- CVE List CVE-2023-31606
- GitHub Advisory GHSA-qcm3-vfq5-wfr2
- NVD CVE-2023-31606
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.