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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.06% (percentile 64, 2026-11-26)
- **CWE:** CWE-400, CWE-407
- **Published:** 2023-03-31T22:01:16.350Z
- **Modified:** 2026-06-17T05:43:26.410Z

## Who should check

- Anyone running github cmark-gfm \< 0.29.0.gfm.10

## 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)

## Affected and fixed versions

- github cmark-gfm: \< 0.29.0.gfm.10 (cvelist)

## Mitigation

- Upgrade cmark-gfm to 0.29.0.gfm.10 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-26485. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-26485.md
Affected: github cmark-gfm < 0.29.0.gfm.10
Fixed in: github cmark-gfm 0.29.0.gfm.10

Steps:
1. Search this machine and project for github cmark-gfm: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-26485 being exploited?

There is no confirmed exploitation: CVE-2023-26485 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.06% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-26485?

Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-26485?

github cmark-gfm \< 0.29.0.gfm.10.

### Is there a fix for CVE-2023-26485?

Yes. Fixed in github cmark-gfm 0.29.0.gfm.10. Upgrade cmark-gfm to 0.29.0.gfm.10 or later.

### How do I check if I'm affected by CVE-2023-26485?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5>
- patch: <https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-26485>

HTML: <https://flawdb.com/CVE-2023-26485> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-26485>
