{"id":"CVE-2023-24824","aliases":["CVE-2023-24824","HSEC-2025-0007","GHSA-66g8-4hjf-77xh"],"related":[],"kind":"vulnerability","state":"published","title":"Quadratic complexity may lead to a denial of service in cmark-gfm","summary":"cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C. A polynomial time complexity issue in cmark-gfm may lead to unbounded resource exhaustion and subsequent denial of service. This CVE covers quadratic complexity issues when parsing text which leads with either large numbers of `>` or `-` characters. This issue has been addressed in version 0.29.0.gfm.10. Users are advised to upgrade. Users unable to upgrade should validate that their input comes from trusted sources.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C. A polynomial time complexity issue in cmark-gfm may lead to unbounded resource exhaustion and subsequent denial of service. This CVE covers quadratic complexity issues when parsing text which leads with either large numbers of `>` or `-` characters. This issue has been addressed in version 0.29.0.gfm.10. Users are advised to upgrade. Users unable to upgrade should validate that their input comes from trusted sources.","source":"cvelist"},{"lang":"en","text":"# cmark-gfm: resource exhaustion due to quadratic complexity in parser\n\n*cmark-gfm* is GitHub's fork of *cmark*, a CommonMark parsing and\nrendering library and program in C.  A polynomial time complexity\nissue in cmark-gfm may lead to unbounded resource exhaustion and\nsubsequent denial of service, due to quadratic complexity issues\nwhen parsing text which leads with either large numbers of `>` or\n`-` characters.\n\nThe Haskell *cmark-gfm* package bundles the C sources and was\naffected by this issue.  This fix was released in the upstream C\npackage at version `0.29.0.gfm.10`.  Version `0.2.6` of the Haskell\npackage adopted the fix (moving from `0.29.0.gfm.6` to\n`0.29.0.gfm.13`).  Packages that depend on *cmark-gfm* should update\nto `0.2.6` or later.\n\nUsers unable to update should avoid processing data from untrusted\nsources or validate the input with other tools before using\n*cmark-gfm* to parse it.\n\nPandoc `< 2.10.1` depended on *cmark-gfm* and could be affected by\nthis issue.","format":"markdown","source":"hsec"}],"published":"2023-03-31T22:01:18.220Z","modified":"2026-06-17T05:39:56.317Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-407"],"affected":[{"ranges":[{"version":"< 0.29.0.gfm.10","status":"affected"}],"vendor":"github","product":"cmark-gfm","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.1.0","status":"affected","fixed":"0.2.6"}],"ecosystem":"Hackage","package":"cmark-gfm","purl":"pkg:hackage/cmark-gfm","source":"hsec"},{"ranges":[{"status":"affected","fixed":"0.29.0.gfm.10."}],"vendor":"github","product":"cmark-gfm","cpe":"cpe:2.3:a:github:cmark-gfm:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh","tags":["advisory","exploit","vendor-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","hsec","nvd"]},{"url":"https://github.com/github/cmark-gfm/commit/2300c1bd2c8226108885bf019655c4159cf26b59","tags":["fix","patch","x-refsource-misc","x-transferred"],"sources":["cvelist","hsec","nvd"]},{"url":"https://github.com/kivikakk/cmark-gfm-hs/commit/1359b8740c6b29dde0ad8f816531112b32eb8cbe","tags":["fix"],"sources":["hsec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-24824","tags":["advisory"],"sources":["hsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-02-11T17:19:34.977Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-24824","url":"https://www.cve.org/CVERecord?id=CVE-2023-24824","licence":"CVE Terms of Use","modified":"2025-02-11T17:19:40.510Z"},{"source":"hsec","name":"Haskell Security Advisories","id":"HSEC-2025-0007","url":"https://osv.dev/vulnerability/HSEC-2025-0007","licence":"CC0-1.0","modified":"2025-12-27T09:11:06.022Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-24824","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-24824","licence":"Public domain","modified":"2026-06-17T05:39:56.317Z"}],"updatedAt":"2026-11-25T22:58:22.937Z","epss":{"score":0.01027,"percentile":0.64575,"date":"2026-12-01T12:00:22.000Z"}}