{"id":"GHSA-fmx4-26r3-wxpf","summary":"Integer overflow in cmark-gfm table parsing extension leads to heap memory corruption","details":"### Impact\n\nCommonMarker 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.\n\nIf affected versions of CommonMarker are used for rendering remote user controlled markdown, this vulnerability may lead to Remote Code Execution (RCE).\n\n### Patches\n\nThis vulnerability has been patched in the following CommonMarker release:\n\n- v0.23.4\n\n### Workarounds\n\nThe vulnerability exists in the table markdown extensions of `cmark-gfm`. Disabling any use of the table extension will prevent this vulnerability from being triggered.\n\n### References\n\n- https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x\n\n### Acknowledgements\n\nWe would like to thank Felix Wilhelm of Google's Project Zero for reporting this vulnerability\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [CommonMarker](http://github.com/gjtorikian/commonmarker)","aliases":["CVE-2024-22051"],"modified":"2026-05-14T20:48:53Z","published":"2022-03-03T20:28:47Z","related":["CVE-2024-22051"],"database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-190"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2022-03-03T20:28:47Z"},"references":[{"type":"WEB","url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x"},{"type":"WEB","url":"https://github.com/gjtorikian/commonmarker/security/advisories/GHSA-fmx4-26r3-wxpf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22051"},{"type":"WEB","url":"https://github.com/gjtorikian/commonmarker/commit/ab4504fd17460627a6ab255bc3c63e8e5fc6aed3"},{"type":"PACKAGE","url":"https://github.com/gjtorikian/commonmarker"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/commonmarker/CVE-2024-22051.yml"}],"affected":[{"package":{"name":"commonmarker","ecosystem":"RubyGems","purl":"pkg:gem/commonmarker"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.4"}]}],"versions":["0.0.1","0.1.0","0.1.1","0.1.2","0.1.3","0.10.0","0.11.0","0.12.0","0.13.0","0.14.0","0.14.1","0.14.11","0.14.12","0.14.13","0.14.14","0.14.15","0.14.2","0.14.3","0.14.4","0.14.5","0.14.6","0.14.7","0.14.8","0.14.9","0.15.0","0.16.0","0.16.1","0.16.2","0.16.3","0.16.4","0.16.5","0.16.6","0.16.7","0.16.8","0.17.0","0.17.1","0.17.10","0.17.11","0.17.12","0.17.13","0.17.2","0.17.4","0.17.5","0.17.6","0.17.7","0.17.7.1","0.17.8","0.17.9","0.18.0","0.18.1","0.18.2","0.19.0","0.2.0","0.2.1","0.20.0","0.20.1","0.20.2","0.21.0","0.21.1","0.21.2","0.22.0","0.23.0","0.23.1","0.23.2","0.3.0","0.4.0","0.4.1","0.5.0","0.5.1","0.6.0","0.7.0","0.8.0","0.9.0","0.9.1","0.9.2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-fmx4-26r3-wxpf/GHSA-fmx4-26r3-wxpf.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}