CVE-2022-24724

NameCVE-2022-24724
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
bullseye0.29.0.gfm.0-6vulnerable
bookworm, sid0.29.0.gfm.3-3fixed
ghostwriter (PTS)buster1.7.4-2vulnerable
bullseye1.8.1-2vulnerable
bookworm, sid2.1.1-1vulnerable
python-cmarkgfm (PTS)buster, bullseye0.4.2-1vulnerable
bookworm, sid0.8.0-1fixed
r-cran-commonmark (PTS)buster1.7-1vulnerable
bullseye1.7-2vulnerable
bookworm, sid1.8.0-1fixed
ruby-commonmarker (PTS)buster0.17.9-1vulnerable
bullseye0.21.0-1vulnerable
bookworm, sid0.23.4-1vulnerable

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
cmark-gfmsource(unstable)0.29.0.gfm.3-31006756
ghostwritersource(unstable)(unfixed)1006757
python-cmarkgfmsource(unstable)0.7.0-11006758
r-cran-commonmarksource(unstable)1.8.0-11006760
ruby-commonmarkersource(unstable)(unfixed)1006759

Notes

[bullseye] - r-cran-commonmark <no-dsa> (Minor issue)
[buster] - r-cran-commonmark <no-dsa> (Minor issue)
https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x
https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.3
https://github.com/github/cmark-gfm/commit/ac80f7b56522ffa158e1f0c14a611ffccacd4027 (0.29.0.gfm.3)
https://bugs.chromium.org/p/project-zero/issues/detail?id=2258

Search for package or bug name: Reporting problems