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, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, 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
sid, trixie, bookworm0.29.0.gfm.6-6fixed
ghostwriter (PTS)buster1.7.4-2fixed
bullseye1.8.1-2fixed
bookworm2.1.6+ds-2fixed
trixie23.04.3+ds-1fixed
sid24.12.0+ds-1fixed
python-cmarkgfm (PTS)buster, bullseye0.4.2-1vulnerable
sid, trixie, bookworm0.8.0-3fixed
r-cran-commonmark (PTS)buster1.7-1vulnerable
bullseye1.7-2vulnerable
bookworm1.8.1-1fixed
sid, trixie1.9.2-2fixed
ruby-commonmarker (PTS)buster0.17.9-1vulnerable
bullseye0.21.0-1vulnerable
bookworm0.23.6-1fixed
sid, trixie0.23.10-1fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
cmark-gfmsource(unstable)0.29.0.gfm.3-31006756
ghostwritersourcebuster(not affected)
ghostwritersourcebullseye(not affected)
ghostwritersource(unstable)2.1.6+ds-11006757
python-cmarkgfmsource(unstable)0.7.0-11006758
r-cran-commonmarksource(unstable)1.8.0-11006760
ruby-commonmarkersource(unstable)0.23.4-11006759

Notes

[bullseye] - cmark-gfm <no-dsa> (Minor issue)
[buster] - cmark-gfm <no-dsa> (Minor issue)
[bullseye] - ghostwriter <not-affected> (Vulnerable code not present)
[buster] - ghostwriter <not-affected> (Vulnerable code not present)
[bullseye] - python-cmarkgfm <no-dsa> (Minor issue)
[buster] - python-cmarkgfm <no-dsa> (Minor issue)
[bullseye] - ruby-commonmarker <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)
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://github.com/gjtorikian/commonmarker/26ff69679d1bf53adf43279236a7f74d06013f4c (v0.23.4)
https://bugs.chromium.org/p/project-zero/issues/detail?id=2258

Search for package or bug name: Reporting problems