CVE-2023-26485: github cmark-gfm Uncontrolled Resource Consumption
Vulnerability summary
CVE-2023-26485 is a high (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in github cmark-gfm. EPSS estimates a 1.03% chance of exploitation in the next 30 days, higher than 63.1% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 31-03-2023PublishedVulnerability first disclosed.
- 11-02-2025Last modifiedVulnerability information updated.
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)
CVSS metrics
4 scores · 4 sources · 1 version- CVE.orgCNA5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
1.03%
Chance of exploitation in the next 30 days
Percentile
63%
Versus all other CVEs
30-day change
0.00 pp
From 1.03% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundCmark Gfm
Maturity: poc
Weaknesses
CWE · root cause- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
- CWE-407Inefficient Algorithmic ComplexityAn 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.
Affected systems
Debian4 products
- cmark-gfmAll versions (No fix recorded) | < 0.29.0.gfm.13-1
- python-cmarkgfmAll versions (No fix recorded) | < 2024.11.20-1
- r-cran-commonmarkAll versions (No fix recorded) | < 1.9.1-1
- ruby-commonmarkerAll versions (No fix recorded) | < 0.23.10-1
Ubuntu2 products
- cmarkAll versions (No fix recorded)
- cmark-gfm< 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
Github1 product
- cmark-gfm< 0.29.0.gfm.10
3 vendors · 7 products
References
6 links- github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5X Refsource CONFIRMREPORTExploitVendor Advisory