{"id":"UBUNTU-CVE-2022-39209","details":"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.","modified":"2026-04-22T15:40:13.349504Z","published":"2022-09-15T18:15:00Z","related":["USN-7319-1"],"upstream":["CVE-2022-39209"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-39209"},{"type":"REPORT","url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-cgh3-p57x-9q7q"},{"type":"REPORT","url":"https://en.wikipedia.org/wiki/Time_complexity"},{"type":"REPORT","url":"https://github.com/github/cmark-gfm/commit/9d57d8a23142b316282bdfc954cb0ecda40a8655"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-39209"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-7319-1"}],"affected":[{"package":{"name":"cmark-gfm","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/cmark-gfm@0.29.0.gfm.0-4ubuntu0.1~esm1?arch=source&distro=esm-apps/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.29.0.gfm.0-4ubuntu0.1~esm1"}]}],"versions":["0.28.3.gfm.20-3","0.29.0.gfm.0-3","0.29.0.gfm.0-4"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"cmark-gfm","binary_version":"0.29.0.gfm.0-4ubuntu0.1~esm1"},{"binary_name":"libcmark-gfm-extensions0","binary_version":"0.29.0.gfm.0-4ubuntu0.1~esm1"},{"binary_name":"libcmark-gfm0","binary_version":"0.29.0.gfm.0-4ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-39209.json"}},{"package":{"name":"cmark-gfm","ecosystem":"Ubuntu:Pro:22.04:LTS","purl":"pkg:deb/ubuntu/cmark-gfm@0.29.0.gfm.3-3ubuntu0.1~esm1?arch=source&distro=esm-apps/jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.29.0.gfm.3-3ubuntu0.1~esm1"}]}],"versions":["0.29.0.gfm.0-6","0.29.0.gfm.2-1","0.29.0.gfm.2-1+really.0.29.0.gfm.0ubuntu1","0.29.0.gfm.2-2","0.29.0.gfm.3-3"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_version":"0.29.0.gfm.3-3ubuntu0.1~esm1","binary_name":"cmark-gfm"},{"binary_name":"libcmark-gfm-extensions0.29.0.gfm.3","binary_version":"0.29.0.gfm.3-3ubuntu0.1~esm1"},{"binary_name":"libcmark-gfm0.29.0.gfm.3","binary_version":"0.29.0.gfm.3-3ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-39209.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}