7.5

CVE-2023-26485: Quadratic complexity may lead to a denial of service in cmark-gfm

Modified
AliasesUBUNTU-CVE-2023-26485DEBIAN-CVE-2023-26485
Published 31-03-2023Last modified 11-02-2025

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 64.8% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
1.03%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 31-03-2023
    PublishedVulnerability first disclosed.
  2. 11-02-2025
    Last 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

EPSS trend

Probability

1.03%

Chance of exploitation in the next 30 days

Percentile

65%

Versus all other CVEs

30-day change

No change 0.00 pp

From 1.03% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Cmark Gfm

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

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

3 vendors · 7 products

References

6 links