Vulnerability · Published Sep 15, 2022 · Assigned by GitHub_M

CVE-2022-39209Uncontrolled Resource Consumption in cmark-gfm

High 7.5

In plain English

A high-severity uncontrolled resource consumption in cmark-gfm from github. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.2% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)2.2%top 17.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12cmark-gfm0.29.0.gfm.6-2DEBIAN-CVE-2022-39209
Debian:13cmark-gfm0.29.0.gfm.6-2DEBIAN-CVE-2022-39209
Debian:14cmark-gfm0.29.0.gfm.6-2DEBIAN-CVE-2022-39209
Debian:12ghostwriter2.1.6+ds-1DEBIAN-CVE-2022-39209
Debian:13ghostwriter2.1.6+ds-1DEBIAN-CVE-2022-39209
Debian:14ghostwriter2.1.6+ds-1DEBIAN-CVE-2022-39209
Debian:12python-cmarkgfmno fix listedDEBIAN-CVE-2022-39209
Debian:13python-cmarkgfm2024.11.20-1DEBIAN-CVE-2022-39209
Debian:14python-cmarkgfm2024.11.20-1DEBIAN-CVE-2022-39209
Debian:12r-cran-commonmark1.8.1-1DEBIAN-CVE-2022-39209
Debian:13r-cran-commonmark1.8.1-1DEBIAN-CVE-2022-39209
Debian:14r-cran-commonmark1.8.1-1DEBIAN-CVE-2022-39209
Debian:12ruby-commonmarkerno fix listedDEBIAN-CVE-2022-39209
Debian:13ruby-commonmarker0.23.10-1DEBIAN-CVE-2022-39209
Debian:14ruby-commonmarker0.23.10-1DEBIAN-CVE-2022-39209

Affected products (as reported)

VendorProductVersions
github cmark-gfm < 0.29.0.gfm.6

Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References