CVEfocus › CVE database › CVE-2022-24724

CVE-2022-24724Integer overflow in table parsing extension leads to heap memory corruption

CVSS 8.8 HighEPSS 3.5% (higher than 90% of CVEs)Published 2022-03-03Updated 2025-04-22Assigner: GitHub_M

cmark-gfm is GitHub's extended version of the C reference implementation of CommonMark. Prior to versions 0.29.0.gfm.3 and 0.28.3.gfm.21, an integer overflow in cmark-gfm's table row parsing `table.c:row_from_string` may lead to heap memory corruption when parsing tables who's marker rows contain more than UINT16_MAX columns. The impact of this heap corruption ranges from Information Leak to Arbitrary Code Execution depending on how and where `cmark-gfm` is used. If `cmark-gfm` is used for rendering remote user controlled markdown, this vulnerability may lead to Remote Code Execution (RCE) in applications employing affected versions of the `cmark-gfm` library. This vulnerability has been patched in the following cmark-gfm versions 0.29.0.gfm.3 and 0.28.3.gfm.21. A workaround is available. The vulnerability exists in the table markdown extensions of cmark-gfm. Disabling the table extension will prevent this vulnerability from being triggered.

CWE-190

What to do

Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

20Fixed
1Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04cmark-gfmFix pendingUBUNTU-CVE-2022-24724
Debian 14cmark-gfmFixed0.29.0.gfm.3-3DEBIAN-CVE-2022-24724
Debian 14ghostwriterFixed2.1.6+ds-1DEBIAN-CVE-2022-24724
Debian 14python-cmarkgfmFixed0.7.0-1DEBIAN-CVE-2022-24724
Debian 14r-cran-commonmarkFixed1.8.0-1DEBIAN-CVE-2022-24724
Debian 14ruby-commonmarkerFixed0.23.4-1DEBIAN-CVE-2022-24724
Debian 13cmark-gfmFixed0.29.0.gfm.3-3DEBIAN-CVE-2022-24724
Debian 13ghostwriterFixed2.1.6+ds-1DEBIAN-CVE-2022-24724
Debian 13python-cmarkgfmFixed0.7.0-1DEBIAN-CVE-2022-24724
Debian 13r-cran-commonmarkFixed1.8.0-1DEBIAN-CVE-2022-24724
Debian 13ruby-commonmarkerFixed0.23.4-1DEBIAN-CVE-2022-24724
Debian 12cmark-gfmFixed0.29.0.gfm.3-3DEBIAN-CVE-2022-24724
Debian 12ghostwriterFixed2.1.6+ds-1DEBIAN-CVE-2022-24724
Debian 12python-cmarkgfmFixed0.7.0-1DEBIAN-CVE-2022-24724
Debian 12r-cran-commonmarkFixed1.8.0-1DEBIAN-CVE-2022-24724
Debian 12ruby-commonmarkerFixed0.23.4-1DEBIAN-CVE-2022-24724
Red Hat Enterprise Linux 8pandocFixed0:2.0.6-6.el8_6RHSA-2022:5597
Red Hat Enterprise Linux 8pandoc-commonFixed0:2.0.6-6.el8_6RHSA-2022:5597
AlmaLinux 8pandocFixed2.0.6-6.el8_6ALSA-2022:5597
AlmaLinux 8pandoc-commonFixed2.0.6-6.el8_6ALSA-2022:5597
Rocky Linux 8pandocFixed0:2.0.6-6.el8_6RLSA-2022:5597

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.