Name | CVE-2022-24724 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Debian Bugs | 1006756, 1006757, 1006758, 1006759, 1006760 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
cmark-gfm (PTS) | buster | 0.28.3.gfm.19-3 | vulnerable |
bullseye | 0.29.0.gfm.0-6 | vulnerable | |
sid, trixie, bookworm | 0.29.0.gfm.6-6 | fixed | |
ghostwriter (PTS) | buster | 1.7.4-2 | fixed |
bullseye | 1.8.1-2 | fixed | |
bookworm | 2.1.6+ds-2 | fixed | |
sid, trixie | 23.04.3+ds-1 | fixed | |
python-cmarkgfm (PTS) | buster, bullseye | 0.4.2-1 | vulnerable |
sid, trixie, bookworm | 0.8.0-3 | fixed | |
r-cran-commonmark (PTS) | buster | 1.7-1 | vulnerable |
bullseye | 1.7-2 | vulnerable | |
bookworm | 1.8.1-1 | fixed | |
trixie | 1.9.1-1 | fixed | |
sid | 1.9.2-1 | fixed | |
ruby-commonmarker (PTS) | buster | 0.17.9-1 | vulnerable |
bullseye | 0.21.0-1 | vulnerable | |
bookworm | 0.23.6-1 | fixed | |
sid, trixie | 0.23.10-1 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
cmark-gfm | source | (unstable) | 0.29.0.gfm.3-3 | 1006756 | ||
ghostwriter | source | buster | (not affected) | |||
ghostwriter | source | bullseye | (not affected) | |||
ghostwriter | source | (unstable) | 2.1.6+ds-1 | 1006757 | ||
python-cmarkgfm | source | (unstable) | 0.7.0-1 | 1006758 | ||
r-cran-commonmark | source | (unstable) | 1.8.0-1 | 1006760 | ||
ruby-commonmarker | source | (unstable) | 0.23.4-1 | 1006759 |
[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