CVE-2024-22051
commonmarker: integer overflow in cmark-gfm's table row parsing may lead to heap memory corruption
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Ruby Advisory DB. Rated lower by GHSA (high), Red Hat (high).
Description
CommonMarker versions prior to 0.23.4 are at risk of an integer overflow vulnerability. This vulnerability can result in possibly unauthenticated remote attackers to cause heap memory corruption, potentially leading to an information leak or remote code execution, via parsing tables with marker rows that contain more than UINT16_MAX columns.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| rubygems::Ruby Advisory Database | commonmarker | >= 0.23.4 |
| debian 10 | ruby-commonmarker | no fix listed |
| debian 11 | ruby-commonmarker | no fix listed |
| debian 12 | ruby-commonmarker | 0.23.4-1 |
| debian 13 | ruby-commonmarker | 0.23.4-1 |
| debian 14 | ruby-commonmarker | 0.23.4-1 |
| echo | ruby-commonmarker | 0.23.4-1 |
| rubygems::GitHub Security Advisory RubyGems | commonmarker | 0.23.4 |
References
- https://access.redhat.com/security/cve/CVE-2024-22051
- https://github.com/advisories/GHSA-fmx4-26r3-wxpf
- https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x
- https://github.com/gjtorikian/commonmarker
- https://github.com/gjtorikian/commonmarker/commit/ab4504fd17460627a6ab255bc3c63e8e5fc6aed3
- https://github.com/gjtorikian/commonmarker/security/advisories/GHSA-fmx4-26r3-wxpf
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/commonmarker/CVE-2024-22051.yml
- https://nvd.nist.gov/vuln/detail/CVE-2024-22051