CVE-2022-39209: Uncontrolled Resource Consumption in cmark-gfm

Published Sep 15, 2022
·
Updated

cmark-gfm is GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C. In versions prior to 0.29.0.gfm.6 a polynomial time complexity issue in cmark-gfm's autolink extension may lead to unbounded resource exhaustion and subsequent denial of service. Users may verify the patch by running python3 -c 'print("![l" 100000 + "\n")' | ./cmark-gfm -e autolink, which will resource exhaust on unpatched cmark-gfm but render correctly on patched cmark-gfm. This vulnerability has been patched in 0.29.0.gfm.6. Users are advised to upgrade. Users unable to upgrade should disable the use of the autolink extension.

Affected Software

24 affected componentsFixes available
GitHub cmark-gfm<0.29.0.gfm.6
Fedoraproject Fedora=35
Fedoraproject Fedora=36
Fedoraproject Fedora=37
debian/cmark-gfm<0.29.0.gfm.6-2
0.29.0.gfm.6-2
debian/cmark-gfm<0.29.0.gfm.6-2
0.29.0.gfm.6-2
debian/cmark-gfm<0.29.0.gfm.6-2
0.29.0.gfm.6-2
debian/ghostwriter<2.1.6+ds-1
2.1.6+ds-1
debian/ghostwriter<2.1.6+ds-1
2.1.6+ds-1
debian/ghostwriter<2.1.6+ds-1
2.1.6+ds-1
debian/python-cmarkgfm*
debian/python-cmarkgfm<2024.11.20-1
2024.11.20-1
debian/python-cmarkgfm<2024.11.20-1
2024.11.20-1
debian/r-cran-commonmark<1.8.1-1
1.8.1-1
debian/r-cran-commonmark<1.8.1-1
1.8.1-1
debian/r-cran-commonmark<1.8.1-1
1.8.1-1
debian/ruby-commonmarker*
debian/ruby-commonmarker<0.23.10-1
0.23.10-1
debian/ruby-commonmarker<0.23.10-1
0.23.10-1
debian/cmark-gfm
0.29.0.gfm.6-60.29.0.gfm.13-40.29.0.gfm.13-7.1
debian/ghostwriter
2.1.6+ds-225.04.0+ds-126.04.0+ds-1
debian/python-cmarkgfm<=0.8.0-3
2024.11.20-12025.10.22-2
debian/r-cran-commonmark
1.8.1-11.9.5-12.0.0-3
debian/ruby-commonmarker<=0.23.6-1
0.23.10-12.10.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/cmark-gfm to a version that resolves this vulnerability.

    Fixed in 0.29.0.gfm.6-6Fixed in 0.29.0.gfm.13-4Fixed in 0.29.0.gfm.13-7.1
  2. Upgrade

    Upgrade debian/ghostwriter to a version that resolves this vulnerability.

    Fixed in 2.1.6+ds-2Fixed in 25.04.0+ds-1Fixed in 26.04.0+ds-1
  3. Upgrade

    Upgrade debian/python-cmarkgfm to a version that resolves this vulnerability.

    Fixed in 2024.11.20-1Fixed in 2025.10.22-2
  4. Upgrade

    Upgrade debian/r-cran-commonmark to a version that resolves this vulnerability.

    Fixed in 1.8.1-1Fixed in 1.9.5-1Fixed in 2.0.0-3
  5. Upgrade

    Upgrade debian/ruby-commonmarker to a version that resolves this vulnerability.

    Fixed in 0.23.10-1Fixed in 2.10.1-1
  6. Upgrade

    Upgrade debian/cmark-gfm to a version that resolves this vulnerability.

    Fixed in 0.29.0.gfm.6-2
  7. Upgrade

    Upgrade debian/ghostwriter to a version that resolves this vulnerability.

    Fixed in 2.1.6+ds-1
  8. Upgrade

    Upgrade debian/python-cmarkgfm to a version that resolves this vulnerability.

    Fixed in 2024.11.20-1
  9. Upgrade

    Upgrade debian/r-cran-commonmark to a version that resolves this vulnerability.

    Fixed in 1.8.1-1
  10. Upgrade

    Upgrade debian/ruby-commonmarker to a version that resolves this vulnerability.

    Fixed in 0.23.10-1
  11. Upgrade

    Upgrade cmark-gfm to a version that resolves this vulnerability.

    Fixed in 0.29.0.gfm.6
  12. Configuration

    Disable use of the autolink extension if unable to upgrade.

    cmark-gfm autolink extension = disabled

Event History

Sep 15, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·06:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2022-39209?

CVE-2022-39209 is a vulnerability in cmark-gfm, GitHub's fork of cmark, which could lead to unbounded resource exhaustion and denial of service.

2

What is the severity of CVE-2022-39209?

The severity of CVE-2022-39209 is high with a severity score of 6.5.

3

How does CVE-2022-39209 affect cmark-gfm?

CVE-2022-39209 affects cmark-gfm versions prior to 0.29.0.gfm.6 and may lead to unbounded resource exhaustion and subsequent denial of service.

4

How can I verify if my version of cmark-gfm is affected by CVE-2022-39209?

You can verify if your version of cmark-gfm is affected by CVE-2022-39209 by checking the patch version. Versions prior to 0.29.0.gfm.6 are affected.

5

How can I fix CVE-2022-39209?

To fix CVE-2022-39209, you should update cmark-gfm to version 0.29.0.gfm.6 or newer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203