Descriptioncmark-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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)
Debian Bugs1006756, 1006757, 1006758, 1006759, 1006760

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
cmark-gfm (PTS)buster0.28.3.gfm.19-3vulnerable
bookworm, sid0.29.0.gfm.6-6fixed
ghostwriter (PTS)buster1.7.4-2fixed
bookworm, sid2.1.6+ds-2fixed
python-cmarkgfm (PTS)buster, bullseye0.4.2-1vulnerable
bookworm, sid0.8.0-3fixed
r-cran-commonmark (PTS)buster1.7-1vulnerable
bookworm, sid1.8.1-1fixed
ruby-commonmarker (PTS)buster0.17.9-1vulnerable
bookworm, sid0.23.6-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ghostwritersourcebuster(not affected)
ghostwritersourcebullseye(not affected)


[buster] - cmark-gfm <no-dsa> (Minor issue)
[bullseye] - ghostwriter <not-affected> (Vulnerable code not present)
[buster] - ghostwriter <not-affected> (Vulnerable code not present)
[buster] - python-cmarkgfm <no-dsa> (Minor issue)
[buster] - ruby-commonmarker <no-dsa> (Minor issue)
[bullseye] - r-cran-commonmark <no-dsa> (Minor issue)
[buster] - r-cran-commonmark <no-dsa> (Minor issue) (0.29.0.gfm.3) (v0.23.4)

Search for package or bug name: Reporting problems