CVE-2023-26485
published 2023-03-31CVE-2023-26485: 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…
PriorityP336high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
1.03%
59.4th percentile
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
10 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | cmark-gfm | < cmark-gfm 0.29.0.gfm.13-1 (forky) | cmark-gfm 0.29.0.gfm.13-1 (forky) |
| debian | python-cmarkgfm | < cmark-gfm 0.29.0.gfm.13-1 (forky) | cmark-gfm 0.29.0.gfm.13-1 (forky) |
| debian | r-cran-commonmark | < cmark-gfm 0.29.0.gfm.13-1 (forky) | cmark-gfm 0.29.0.gfm.13-1 (forky) |
| debian | ruby-commonmarker | < cmark-gfm 0.29.0.gfm.13-1 (forky) | cmark-gfm 0.29.0.gfm.13-1 (forky) |
| github | cmark-gfm | < 0.29.0.gfm.10 | 0.29.0.gfm.10 |
| github | cmark-gfm | >= 0 < 0.29.0.gfm.13-1 | 0.29.0.gfm.13-1 |
| github | cmark-gfm | >= 0 < 0.29.0.gfm.13-1 | 0.29.0.gfm.13-1 |
| github | cmark-gfm | >= 0 < 0.29.0.gfm.0-4ubuntu0.1~esm1 | 0.29.0.gfm.0-4ubuntu0.1~esm1 |
| github | cmark-gfm | >= 0 < 0.29.0.gfm.3-3ubuntu0.1~esm1 | 0.29.0.gfm.3-3ubuntu0.1~esm1 |
| github | cmark-gfm | >= 0 < 0.29.0.gfm.6-6ubuntu0.24.04.1~esm1 | 0.29.0.gfm.6-6ubuntu0.24.04.1~esm1 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
ghsa7.5HIGH
osv7.5HIGH
vendor_ubuntu7.5HIGH
vendor_debian5.3MEDIUM
vendor_redhat5.3MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
cmark-gfm vulnerabilities
osv·2025-03-03·CVSS 6.5
CVE-2022-39209 [MEDIUM] cmark-gfm vulnerabilities
cmark-gfm vulnerabilities
It was discovered that cmark-gfm's autolink extension did not correctly
handle parsing large inputs. An attacker could possibly use this issue
to cause a denial of service. This issue only affected Ubuntu 20.04 LTS
and Ubuntu 22.04 LTS. (CVE-2022-39209)
It was discovered that cmark-gfm did not correctly handle parsing large
inputs. An attacker could possibly use this issue to cause a denial of
service. This issue only affected Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and
Ubuntu 24.10. (CVE-2023-22483)
It was discovered that cmark-gfm did not correctly handle parsing large
inputs. An attacker could possibly use this issue to cause a denial of
service. This issue only affected Ubuntu 24.04 LTS and Ubuntu 24.10.
(CVE-2023-22484)
It was discovered that cmark-gfm did not
GHSA
Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
ghsa·2023-04-11·CVSS 7.5
CVE-2023-24824 [HIGH] Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
## Impact
Several quadratic complexity bugs in commonmarker's underlying [`cmark-gfm`](https://github.com/github/cmark-gfm) library may lead to unbounded resource exhaustion and subsequent denial of service.
The following vulnerabilities were addressed:
* [CVE-2023-24824](https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh)
* [CVE-2023-26485](https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5)
For more information, consult the release notes for version [`0.23.0.gfm.10`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.10) and [`0.23.0.gfm.11`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.11).
## Mitigation
Users
OSV
Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
osv·2023-04-11·CVSS 7.5
CVE-2023-24824 [HIGH] Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service
## Impact
Several quadratic complexity bugs in commonmarker's underlying [`cmark-gfm`](https://github.com/github/cmark-gfm) library may lead to unbounded resource exhaustion and subsequent denial of service.
The following vulnerabilities were addressed:
* [CVE-2023-24824](https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh)
* [CVE-2023-26485](https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5)
For more information, consult the release notes for version [`0.23.0.gfm.10`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.10) and [`0.23.0.gfm.11`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.11).
## Mitigation
Users
OSV
CVE-2023-26485: cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C
osv·2023-03-31·CVSS 7.5
CVE-2023-26485 [HIGH] CVE-2023-26485: cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C
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 ``` I
Ubuntu
cmark-gfm vulnerabilities
vendor_ubuntu·2025-03-03·CVSS 7.5
CVE-2023-22484 [HIGH] cmark-gfm vulnerabilities
Title: cmark-gfm vulnerabilities
Summary: Several security issues were fixed in cmark-gfm.
It was discovered that cmark-gfm's autolink extension did not correctly
handle parsing large inputs. An attacker could possibly use this issue
to cause a denial of service. This issue only affected Ubuntu 20.04 LTS
and Ubuntu 22.04 LTS. (CVE-2022-39209)
It was discovered that cmark-gfm did not correctly handle parsing large
inputs. An attacker could possibly use this issue to cause a denial of
service. This issue only affected Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and
Ubuntu 24.10. (CVE-2023-22483)
It was discovered that cmark-gfm did not correctly handle parsing large
inputs. An attacker could possibly use this issue to cause a denial of
service. This issue only affected Ubuntu 24.04 LTS and Ubuntu
Red Hat
commonmarker: Quadratic complexity bug may lead to a denial of service
vendor_redhat·2023-04-01·CVSS 5.3
CVE-2023-26485 [MEDIUM] CWE-400 commonmarker: Quadratic complexity bug may lead to a denial of service
commonmarker: Quadratic complexity bug may lead to a denial of service
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
Debian
CVE-2023-26485: cmark-gfm - cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library ...
vendor_debian·2023·CVSS 5.3
CVE-2023-26485 [MEDIUM] CVE-2023-26485: cmark-gfm - cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library ...
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 ``` I
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5https://github.com/github/cmark-gfm/commit/07a66c9bc341f902878e37d7da8647d6ef150987https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5
2023-03-31
Published