CVE-2020-5238 Denial of service in table parsing in cmark-gfm

Medium 6.5 Published Updated

An attacker can cause a denial of service by crafting a markdown table that triggers excessive processing time in the cmark-gfm library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-5238?

CVE-2020-5238 is a medium-severity denial of service vulnerability in Fedoraproject Fedora, published on 1 Jul 2020. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.

Weakness: CWE-20

Which versions are affected by CVE-2020-5238?

1 open source package ship an affected version, including commonmark. It affects 2 products.

PackageAffectedFixed in
commonmark CRANFrom 0.21.8
Linux distribution packages (4)
pandoc AlmaLinux:8All versions2.0.6-5.el8
pandoc-common AlmaLinux:8All versions2.0.6-5.el8
pandoc Red Hat:enterprise_linux:8::crbAll versions0:2.0.6-5.el8
pandoc-common Red Hat:enterprise_linux:8::crbAll versions0:2.0.6-5.el8

Products include Fedoraproject Fedora, Github Flavored Markdown Project Github Flavored Markdown.

How do I fix CVE-2020-5238?

Upgrade commonmark to 1.8 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-2020-5238 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALSA-2021:1972, DEBIAN-CVE-2020-5238, GHSA-7gc6-9qr5-hc85, RHSA-2021:1972, RSEC-2023-6, UBUNTU-CVE-2020-5238.

Is CVE-2020-5238 in your software?

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

Check your SBOMs for free