{"id":"CVE-2023-31606","aliases":["DEBIAN-CVE-2023-31606","DLA-3480-1","EUVD-2023-1866","GHSA-qcm3-vfq5-wfr2","MGASA-2023-0291","UBUNTU-CVE-2023-31606","USN-6358-1"],"status":"published","title":"RedCloth Regular Expression Denial of Service issue","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01513,"percentile":0.74816,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-1333"],"published":"2023-06-06T00:00:00Z","modified":"2026-10-28T02:30:22Z","exploits":[{"source":"pocgithub","id":"merbinr/CVE-2023-31606","title":"merbinr/CVE-2023-31606","date":"2023-06-03","url":"https://github.com/merbinr/CVE-2023-31606"}],"fixes":[{"ecosystem":"RubyGems","package":"RedCloth","fixed_in":["4.3.3"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"ruby-redcloth","fixed_in":["4.3.3-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"ruby-redcloth","fixed_in":["4.3.3-1"],"sources":["osv"]},{"ecosystem":"Debian:10","package":"ruby-redcloth","fixed_in":["4.3.2-3+deb10u1"],"sources":["osv"]},{"ecosystem":"Mageia:8","package":"ruby-RedCloth","fixed_in":["4.3.2-5.1.mga8"],"sources":["osv"]},{"ecosystem":"Mageia:9","package":"ruby-RedCloth","fixed_in":["4.3.2-7.1.mga9"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ruby-redcloth","fixed_in":["4.2.9-5ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ruby-redcloth","fixed_in":["4.3.2-3ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"ruby-redcloth","fixed_in":["4.3.2-3+deb10u1build0.20.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"ruby-redcloth","fixed_in":["4.3.2-4ubuntu0.22.04.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"RedCloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.3.2-4","4.3.3-1","4.3.4-1","4.3.4-2"]},{"source":"osv","ecosystem":"Debian:13","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.3-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.3-1"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-3+deb10u1"}]}],"versions":["4.3.2-3"]},{"source":"osv","ecosystem":"RubyGems","package":"RedCloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.3"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","4.0.0","4.0.1","4.0.2","4.0.3","4.0.4","4.1.0","4.1.1","4.1.9","4.2.0","4.2.1","4.2.2","4.2.3","4.2.4","4.2.4.pre1","4.2.4.pre2","4.2.4.pre3","4.2.5","4.2.7","4.2.8","4.2.9","4.3.0","4.3.1","4.3.2"]},{"source":"osv","ecosystem":"Mageia:8","package":"ruby-RedCloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-5.1.mga8"}]}]},{"source":"osv","ecosystem":"Mageia:9","package":"ruby-RedCloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-7.1.mga9"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.9-5ubuntu0.1~esm1"}]}],"versions":["4.2.9-5build1","4.2.9-5build2","4.2.9-5build3","4.2.9-5build4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-3ubuntu0.1~esm1"}]}],"versions":["4.3.2-2","4.3.2-3","4.3.2-3build1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-3+deb10u1build0.20.04.1"}]}],"versions":["4.3.2-3build1","4.3.2-3build2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-4ubuntu0.22.04.1"}]}],"versions":["4.3.2-3build2","4.3.2-3build3","4.3.2-4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.9-5ubuntu0.1~esm1"}]}],"versions":["4.2.9-5build1","4.2.9-5build2","4.2.9-5build3","4.2.9-5build4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-3ubuntu0.1~esm1"}]}],"versions":["4.3.2-2","4.3.2-3","4.3.2-3build1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-3+deb10u1build0.20.04.1"}]}],"versions":["4.3.2-3build1","4.3.2-3build2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ruby-redcloth","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-4ubuntu0.22.04.1"}]}],"versions":["4.3.2-3build2","4.3.2-3build3","4.3.2-4"]}],"products":[{"vendor":"promptworks","product":"redcloth"}],"references":[{"url":"https://github.com/jgarber/redcloth/issues/73","tags":["x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/jgarber/redcloth","tags":["x_transferred","Product","package","report"]},{"url":"https://github.com/e23e/CVE-2023-31606#readme","tags":["x_transferred","Exploit","Third Party Advisory","package","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/07/msg00002.html","tags":["mailing-list","x_transferred","article","web"]},{"url":"https://security.gentoo.org/glsa/202401-14","tags":["vendor-advisory","x_transferred","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-31606","tags":["advisory"]},{"url":"https://github.com/jgarber/redcloth/blob/v4.3.2/lib/redcloth/formatters/html.rb#L327","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/RedCloth/CVE-2023-31606.yml","tags":["web"]},{"url":"https://github.com/jgarber/redcloth/commit/8b1327688fef8e6617792054ef299d7bc74c0a1e","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qcm3-vfq5-wfr2"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/31xxx/CVE-2023-31606.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-31606","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2023-0291.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=32284","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6358-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2023-31606","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-31606","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2023-31606","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.","status":"published","published":"2023-06-06T00:00:00Z","modified":"2024-08-02T14:53:30.792Z","updated_at":"2026-11-02T14:35:27.430605Z"}],"euvd":[{"id":"EUVD-2023-1866","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.","status":"published","published":"2023-06-06T00:00:00Z","modified":"2024-08-02T14:53:30Z","updated_at":"2026-11-03T03:50:05.51254Z"}],"ghsa":[{"id":"GHSA-qcm3-vfq5-wfr2","title":"RedCloth Regular Expression Denial of Service issue","description":"A Regular Expression Denial of Service (ReDoS) issue was discovered in the `sanitize_html` function of RedCloth gem. This vulnerability allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.","status":"published","published":"2023-06-06T18:30:20Z","modified":"2024-01-10T16:00:22Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:37:30.183224Z"}],"nvd":[{"id":"CVE-2023-31606","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.","status":"published","published":"2023-06-06T17:15:14.843Z","modified":"2026-06-17T05:57:14.023Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:08:05.329837Z"}],"osv":[{"id":"DEBIAN-CVE-2023-31606","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.","status":"published","published":"2023-06-06T17:15:14.843Z","modified":"2026-10-26T18:01:24.552829625Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:39.679062Z"},{"id":"GHSA-qcm3-vfq5-wfr2","title":"RedCloth Regular Expression Denial of Service issue","description":"A Regular Expression Denial of Service (ReDoS) issue was discovered in the `sanitize_html` function of RedCloth gem. This vulnerability allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.","status":"published","published":"2023-06-06T18:30:20Z","modified":"2024-02-16T08:20:39.647392Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:46:54.40888Z"},{"id":"UBUNTU-CVE-2023-31606","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.","status":"published","published":"2023-06-06T17:15:00Z","modified":"2026-02-04T04:23:32.423467Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:54:20.997471Z"},{"id":"CVE-2023-31606","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.","status":"published","published":"2023-06-06T00:00:00Z","modified":"2026-10-28T02:30:22.801652119Z","updated_at":"2026-11-02T15:44:31.790231Z"},{"id":"DLA-3480-1","title":"ruby-redcloth - security update","status":"published","published":"2023-07-06T00:00:00Z","modified":"2026-03-09T01:18:57.224054Z","updated_at":"2026-11-02T15:46:11.734021Z"},{"id":"MGASA-2023-0291","title":"Updated ruby-RedCloth packages fix a security vulnerability","description":"A Regular Expression Denial of Service (ReDoS) issue was discovered\nin the sanitize_html function of redcloth gem v4.0.0. This\nvulnerability allows attackers to cause a Denial of Service (DoS)\nvia supplying a crafted payload. (CVE-2023-31606)\n","status":"published","published":"2023-10-20T08:34:20Z","modified":"2026-04-16T04:42:56.992061596Z","updated_at":"2026-11-02T15:49:42.263076Z"},{"id":"USN-6358-1","title":"ruby-redcloth vulnerability","description":"It was discovered that RedCloth incorrectly handled certain inputs during\nhtml sanitisation. An attacker could possibly use this issue to cause a\ndenial of service.\n","status":"published","published":"2023-09-12T06:54:45Z","modified":"2026-06-25T13:32:18.758227792Z","updated_at":"2026-11-02T16:58:17.305935Z"}]}}
