9.8critical
CommonMarker Integer Overflow Vulnerability
- Severity
- 9.8critical CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 1.61% (higher than 76% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-fmx4-26r3-wxpf
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
| Product or package | Versions | Reported by |
|---|---|---|
| commonmarker | before 0.23.4 | CVE List |
| commonmarker (RubyGems) | before 0.23.4 | GitHub Advisory Database |
| github cmark-gfm | before 0.28.3.gfm.21, from 0.29.0.gfm.0 before 0.29.0.gfm.3 | NVD |
| gjtorikian commonmarker | before 0.23.4 | NVD |
All scores
| CISA-ADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
CommonMarker uses cmark-gfm for rendering Github Flavored Markdown. An integer overflow in cmark-gfm's table row parsing 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
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
NVD (es)
Las versiones de CommonMarker anteriores a la 0.23.4 corren el riesgo de sufrir una vulnerabilidad de desbordamiento de enteros. Esta vulnerabilidad puede provocar que atacantes remotos posiblemente no autenticados provoquen daños en la memoria del montón, lo que podría provocar una fuga de información o la ejecución remota de código, a través de tablas de análisis con filas de marcadores que contienen más de columnas UINT16_MAX.
References
| https://github.com/github/cmark-gfm/security/advisories/GHSA-mc3g-88wq-6f4x | not-applicable, related, vendor-advisory, web | |
| https://github.com/gjtorikian/commonmarker/security/advisories/GHSA-fmx4-26r3-wxpf | vendor-advisory, web | |
| https://github.com/gjtorikian/commonmarker/commit/ab4504fd17460627a6ab255bc3c63e8e5fc6aed3 | patch, web | |
| https://github.com/advisories/GHSA-fmx4-26r3-wxpf | third-party-advisory, vendor-advisory | |
| https://vulncheck.com/advisories/vc-advisory-GHSA-fmx4-26r3-wxpf | third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-22051 | advisory | |
| https://github.com/gjtorikian/commonmarker | package | |
| https://github.com/rubysec/ruby-advisory-db/blob/master/gems/commonmarker/CVE-2024-22051.yml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-22051 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fmx4-26r3-wxpf changed 2026-05-14 | CC-BY-4.0 |
| NVD | CVE-2024-22051 changed 2026-07-14 | Public domain |