Vulnerabilities / CVE-2022-24724

critical

CVE-2022-24724

cmark-gfm: possible RCE due to integer overflow

Published Modified CWE 190
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Red Hat (high), AlmaLinux (high).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
alma 8pandoc, pandoc-common2.0.6-6.el8_6
debian 10cmark-gfm, python-cmarkgfm, r-cran-commonmark and 1 moreno fix listed
debian 11cmark-gfm, python-cmarkgfm, r-cran-commonmark and 1 moreno fix listed
debian 12cmark-gfm, ghostwriter, python-cmarkgfm and 2 more0.29.0.gfm.3-3 and 4 more
debian 13cmark-gfm, ghostwriter, python-cmarkgfm and 2 more0.29.0.gfm.3-3 and 4 more
debian 14cmark-gfm, ghostwriter, python-cmarkgfm and 2 more0.29.0.gfm.3-3 and 4 more
echocmark-gfm, ghostwriter, python-cmarkgfm and 2 more0.29.0.gfm.3-3 and 4 more
Show all 30 entries from 7 sources
SourcePackageFixed in
alma 8pandoc2.0.6-6.el8_6
alma 8pandoc-common2.0.6-6.el8_6
debian 10cmark-gfmno fix listed
debian 10python-cmarkgfmno fix listed
debian 10r-cran-commonmarkno fix listed
debian 10ruby-commonmarkerno fix listed
debian 11cmark-gfmno fix listed
debian 11python-cmarkgfmno fix listed
debian 11r-cran-commonmarkno fix listed
debian 11ruby-commonmarkerno fix listed
debian 12cmark-gfm0.29.0.gfm.3-3
debian 12ghostwriter2.1.6+ds-1
debian 12python-cmarkgfm0.7.0-1
debian 12r-cran-commonmark1.8.0-1
debian 12ruby-commonmarker0.23.4-1
debian 13cmark-gfm0.29.0.gfm.3-3
debian 13ghostwriter2.1.6+ds-1
debian 13python-cmarkgfm0.7.0-1
debian 13r-cran-commonmark1.8.0-1
debian 13ruby-commonmarker0.23.4-1
debian 14cmark-gfm0.29.0.gfm.3-3
debian 14ghostwriter2.1.6+ds-1
debian 14python-cmarkgfm0.7.0-1
debian 14r-cran-commonmark1.8.0-1
debian 14ruby-commonmarker0.23.4-1
echocmark-gfm0.29.0.gfm.3-3
echoghostwriter2.1.6+ds-1
echopython-cmarkgfm0.7.0-1
echor-cran-commonmark1.8.0-1
echoruby-commonmarker0.23.4-1

References

All 14 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.