CVE-2024-22051
HIGH8.8EPSS 12.1%Integer overflow in cmark-gfm table parsing extension leads to heap memory corruption
Description
### Impact CommonMarker uses `cmark-gfm` for rendering [Github Flavored Markdown](https://github.github.com/gfm/). An [integer overflow in `cmark-gfm`'s table row parsing](https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x) 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. If affected versions of CommonMarker are used for rendering remote user controlled markdown, this vulnerability may lead to Remote Code Execution (RCE). ### Patches This vulnerability has been patched in the following CommonMarker release: - v0.23.4 ### Workarounds The vulnerability exists in the table markdown extensions of `cmark-gfm`. Disabling any use of the table extension will prevent this vulnerability from being triggered. ### References - https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x ### Acknowledgements We would like to thank Felix Wilhelm of Google's Project Zero for reporting this vulnerability ### For more information If you have any questions or comments about this advisory: * Open an issue in [CommonMarker](http://github.com/gjtorikian/commonmarker)
Affected packages (2)
- Debian/ruby-commonmarkerfrom 0
- RubyGems/commonmarkerfrom 0, < 0.23.4
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2024-22051
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-22051
- PATCHhttps://github.com/gjtorikian/commonmarker
- WEBhttps://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x
- WEBhttps://github.com/gjtorikian/commonmarker/commit/ab4504fd17460627a6ab255bc3c63e8e5fc6aed3
- WEBhttps://github.com/gjtorikian/commonmarker/security/advisories/GHSA-fmx4-26r3-wxpf
- WEBhttps://github.com/rubysec/ruby-advisory-db/blob/master/gems/commonmarker/CVE-2024-22051.yml