{"schemaVersion":3,"id":"CVE-2023-26485","aliases":["UBUNTU-CVE-2023-26485","DEBIAN-CVE-2023-26485"],"status":"published","duplicateOf":null,"title":null,"description":"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 `_` 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.\n\n\n\n\n### Impact\n\nA polynomial time complexity issue in cmark-gfm may lead to unbounded resource exhaustion and subsequent denial of service.\n\n### Proof of concept\n\n```\n$ ~/cmark-gfm$ python3 -c 'pad = \"_\" * 100000; print(pad + \".\" + pad, end=\"\")' | time ./build/src/cmark-gfm --to plaintext\n```\n\nIncreasing the number 10000 in the above commands causes the running time to increase quadratically.\n\n### Patches\n\nThis vulnerability have been patched in 0.29.0.gfm.10.\n\n### Note on cmark and cmark-gfm\n\nXXX: TBD\n\n[cmark-gfm](https://github.com/github/cmark-gfm) is a fork of [cmark](https://github.com/commonmark/cmark) that adds the GitHub Flavored Markdown extensions. The two codebases have diverged over time, but share a common core. These bugs affect both `cmark` and `cmark-gfm`.\n\n### Credit\n\nWe would like to thank @gravypod for reporting this vulnerability.\n\n### References\n\nhttps://en.wikipedia.org/wiki/Time_complexity\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [github/cmark-gfm](https://github.com/github/cmark-gfm)","dates":{"published":"2023-03-31T22:01:16.350Z","modified":"2025-02-11T17:20:37.921Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01029,"percentile":0.63163,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.01029},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01029,"percentile":0.63163}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01029,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01029,"percentile":0.63163}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_GITHUB_CMARK-GFM","name":"Cmark Gfm","source":"github","url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption","description":"The product does not properly control the allocation and maintenance of a limited resource.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/400.html"},{"id":"CWE-407","name":"Inefficient Algorithmic Complexity","description":"An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"Low","url":"https://cwe.mitre.org/data/definitions/407.html"}],"affected":[{"vendor":"debian","product":"cmark-gfm","name":"cmark-gfm","label":"cmark-gfm","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/cmark-gfm","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 0.29.0.gfm.13-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 0.29.0.gfm.13-1","eol":null,"hubHref":null},{"vendor":"debian","product":"python-cmarkgfm","name":"python-cmarkgfm","label":"python-cmarkgfm","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/python-cmarkgfm","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 2024.11.20-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 2024.11.20-1","eol":null,"hubHref":null},{"vendor":"debian","product":"r-cran-commonmark","name":"r-cran-commonmark","label":"r-cran-commonmark","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/r-cran-commonmark","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 1.9.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 1.9.1-1","eol":null,"hubHref":null},{"vendor":"debian","product":"ruby-commonmarker","name":"ruby-commonmarker","label":"ruby-commonmarker","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby-commonmarker","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 0.23.10-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 0.23.10-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"cmark","name":"cmark","label":"cmark","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/cmark","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"cmark-gfm","name":"cmark-gfm","label":"cmark-gfm","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/cmark-gfm","purlType":"deb","versions":[{"text":"< 0.29.0.gfm.0-4ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 0.29.0.gfm.3-3ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 0.29.0.gfm.6-6ubuntu0.24.04.1~esm1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.29.0.gfm.0-4ubuntu0.1~esm1 | < 0.29.0.gfm.3-3ubuntu0.1~esm1 | < 0.29.0.gfm.6-6ubuntu0.24.04.1~esm1","eol":null,"hubHref":null},{"vendor":"github","product":"cmark-gfm","name":"cmark-gfm","label":"cmark-gfm","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 0.29.0.gfm.10","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.29.0.gfm.10","eol":null,"hubHref":"/vendor/github/cmark-gfm"}],"affectedCount":7,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5","label":"github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","Exploit","Vendor Advisory"]},{"url":"https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987","label":"github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987","hostname":"github.com","tags":["X Refsource MISC","Patch"]},{"url":"https://ubuntu.com/security/CVE-2023-26485","label":"ubuntu.com/security/CVE-2023-26485","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-26485","label":"www.cve.org/CVERecord?id=CVE-2023-26485","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-7319-1","label":"ubuntu.com/security/notices/USN-7319-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-26485","label":"security-tracker.debian.org/tracker/CVE-2023-26485","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["USN-7319-1"],"duplicates":[],"related":["USN-7319-1"]},"timeline":[{"kind":"published","date":"2023-03-31T22:01:16.350Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-02-11T17:20:37.921Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":40,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T10:58:21.200Z","stale":false,"partial":false}}