Resource exhaustion in GitHub Cmark-Gfm
CVE-2022-39209
cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C. In versions prior to 0.29.0.gfm.6 a polynomial time complexity issue in cmark-gfm's autolink extension may lead to unbounded resource exhaustion and subsequent denial of service. Users may verify the patch by running `python3 -c 'print("![l"* 100000 + "\n")' | ./cmark-gfm -e autolink`, which will resource exhaust on unpatched cmark-gfm but render correctly on patched cmark-gfm. This vulnerability has been patched in 0.29.0.gfm.6. Users are advised to upgrade. Users unable to upgrade should disable the use of the autolink extension.
Vulnerability class: DoS (Denial of Service)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS 0.023, 83.5th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- GitHub Cmark-Gfm — versions < 0.29.0.gfm.6
- Fedoraproject Fedora — versions 35, 36, 37
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 1 other repository (karimhabush/cyberowl). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/github/cmark-gfm/security/advisories/GHSA-cgh3-p57x-9q7q (Third Party Advisory)
- github.com/github/cmark-gfm/commit/9d57d8a23142b316282bdfc954cb0ecda40a8655 (Patch, Third Party Advisory)
- en.wikipedia.org/wiki/Time_complexity (Third Party Advisory)
- FEDORA-2022-6bcee2cc93 (vendor-advisory)
- FEDORA-2022-f1aed93db8 (vendor-advisory)
- FEDORA-2022-dc6d6d9d6c (vendor-advisory)