GHSA-4qw4-jpp4-8gvp: Commonmarker Remote Code Execution Vulnerability

MODERATE
CWE-400
Published
Advisory Summary

GHSA-4qw4-jpp4-8gvp is a MODERATE remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Commonmarker libraries in the RubyGems ecosystem. The issue involves unbounded resource exhaustion in cmark-gfm autolink extension may lead to denial of service. Remediation is available by upgrading affected packages to version 0.23.6.

GHSA-4qw4-jpp4-8gvp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4qw4-jpp4-8gvp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Commonmarker
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix GHSA-4qw4-jpp4-8gvp

To remediate this vulnerability, upgrade all affected Commonmarker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

commonmarker fixed: 0.23.6
Upgrade commonmarker to 0.23.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for commonmarker

How to Check if You Are Affected

To determine whether your application is affected by GHSA-4qw4-jpp4-8gvp, inspect your project dependencies for Commonmarker:

inspect dependencies for commonmarker

Analyze the terminal output to locate any version of Commonmarker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Commonmarker, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact CommonMarker uses `cmark-gfm` for rendering [Github Flavored Markdown](https://github.github.com/gfm/). A polynomial time complexity issue in cmark-gfm's autolink extension may lead to unbounded resource exhaustion and subsequent denial of service. ### Patches This vulnerability has been patched in the following CommonMarker release: - v0.23.6 ### Workarounds Disable use of the autolink extension. ### References https://github.com/gjtorikian/commonmarker/pull/190 https://github.com/github/cmark-gfm/security/advisories/GHSA-cgh3-p57x-9q7q 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) ### Acknowledgements We would like to thank [Legit Security](https://www.legitsecurity.com) for reporting this vulnerability.

GHSA-4qw4-jpp4-8gvp Affected Commonmarker Versions

1 component(s)
Fixed Versions:
0.23.6
Product / Package Ecosystem Affected Versions Fixed Version
commonmarker
RubyGems
< 0.23.6
0.23.6

References

Frequently Asked Questions

What is GHSA-4qw4-jpp4-8gvp?
GHSA-4qw4-jpp4-8gvp is a security vulnerability in Commonmarker involving Unbounded resource exhaustion in cmark-gfm autolink extension may lead to denial of service under CWE-400: Uncontrolled Resource Consumption.
Which Commonmarker versions are affected?
Affected versions include releases prior to 0.23.6 across affected packages: commonmarker.
What version fixes GHSA-4qw4-jpp4-8gvp?
Upgrading to 0.23.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commonmarker affected?
Yes, commonmarker is affected in releases prior to 0.23.6. Upgrade your dependency to 0.23.6 or later.
What CWE is associated with GHSA-4qw4-jpp4-8gvp?
GHSA-4qw4-jpp4-8gvp is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for GHSA-4qw4-jpp4-8gvp?
Run the dependency tree command: 'inspect dependencies for commonmarker'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4qw4-jpp4-8gvp",
  "modified" : "2022-09-21T18:18:05Z",
  "published" : "2022-09-21T18:18:05Z",
  "aliases" : [ ],
  "summary" : "Unbounded resource exhaustion in cmark-gfm autolink extension may lead to denial of service",
  "details" : "### Impact\n\nCommonMarker uses `cmark-gfm` for rendering [Github Flavored Markdown](https://github.github.com/gfm/). A polynomial time complexity issue in cmark-gfm's autolink extension may lead to unbounded resource exhaustion and subsequent denial of service.\n\n### Patches\n\nThis vulnerability has been patched in the following CommonMarker release:\n\n- v0.23.6\n\n### Workarounds\n\nDisable use of the autolink extension.\n\n### References\n\nhttps://github.com/gjtorikian/commonmarker/pull/190\nhttps://github.com/github/cmark-gfm/security/advisories/GHSA-cgh3-p57x-9q7q\nhttps://en.wikipedia.org/wiki/Time_complexity\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [github/cmark-gfm](https://github.com/github/cmark-gfm)\n\n### Acknowledgements\n\nWe would like to thank [Legit Security](https://www.legitsecurity.com) for reporting this vulnerability.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "commonmarker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.23.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gjtorikian/commonmarker/security/advisories/GHSA-4qw4-jpp4-8gvp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gjtorikian/commonmarker/pull/190"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gjtorikian/commonmarker"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gjtorikian/commonmarker/releases/tag/v0.23.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-21T18:18:05Z",
    "nvd_published_at" : null
  }
}