{"api_version":"1","generated_at":"2026-04-23T05:08:15+00:00","cve":"CVE-2023-26485","urls":{"html":"https://cve.report/CVE-2023-26485","api":"https://cve.report/api/cve/CVE-2023-26485.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-26485","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-26485"},"summary":{"title":"CVE-2023-26485","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. ### Impact A polynomial time complexity issue in cmark-gfm may lead to unbounded resource exhaustion and subsequent denial of service. ### Proof of concept ``` $ ~/cmark-gfm$ python3 -c 'pad = \"_\" * 100000; print(pad + \".\" + pad, end=\"\")' | time ./build/src/cmark-gfm --to plaintext ``` Increasing the number 10000 in the above commands causes the running time to increase quadratically. ### Patches This vulnerability have been patched in 0.29.0.gfm.10. ### Note on cmark and cmark-gfm XXX: TBD [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`. ### Credit We would like to thank @gravypod for reporting this vulnerability. ### References https://en.wikipedia.org/wiki/Time_complexity ### For more information If you have any questions or comments about this advisory: * Open an issue in [github/cmark-gfm](https://github.com/github/cmark-gfm)","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-03-31 23:15:00","updated_at":"2023-11-07 04:09:00"},"problem_types":["CWE-407","CWE-400"],"metrics":[],"references":[{"url":"https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987","name":"https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-r8vr-c48j-fcc5 · github/cmark-gfm@07a66c9 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5","name":"https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5","refsource":"MISC","tags":[],"title":"Quadratic complexity bug may lead to a denial of service · Advisory · github/cmark-gfm · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-26485","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-26485","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"26485","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"github","cpe5":"cmark-gfm","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-26485","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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. ### Impact A polynomial time complexity issue in cmark-gfm may lead to unbounded resource exhaustion and subsequent denial of service. ### Proof of concept ``` $ ~/cmark-gfm$ python3 -c 'pad = \"_\" * 100000; print(pad + \".\" + pad, end=\"\")' | time ./build/src/cmark-gfm --to plaintext ``` Increasing the number 10000 in the above commands causes the running time to increase quadratically. ### Patches This vulnerability have been patched in 0.29.0.gfm.10. ### Note on cmark and cmark-gfm XXX: TBD [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`. ### Credit We would like to thank @gravypod for reporting this vulnerability. ### References https://en.wikipedia.org/wiki/Time_complexity ### For more information If you have any questions or comments about this advisory: * Open an issue in [github/cmark-gfm](https://github.com/github/cmark-gfm)"}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-400: Uncontrolled Resource Consumption","cweId":"CWE-400"}]},{"description":[{"lang":"eng","value":"CWE-407: Inefficient Algorithmic Complexity","cweId":"CWE-407"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"github","product":{"product_data":[{"product_name":"cmark-gfm","version":{"version_data":[{"version_affected":"=","version_value":"< 0.29.0.gfm.10"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5","refsource":"MISC","name":"https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5"},{"url":"https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987","refsource":"MISC","name":"https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987"}]},"source":{"advisory":"GHSA-r8vr-c48j-fcc5","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"}]}},"nvd":{"publishedDate":"2023-03-31 23:15:00","lastModifiedDate":"2023-11-07 04:09:00","problem_types":["CWE-407","CWE-400"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:github:cmark-gfm:*:*:*:*:*:*:*:*","versionEndExcluding":"0.29.0.gfm.10","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}