GHSA-7vh7-fw88-wj87: Commonmarker Denial of Service Vulnerability

MODERATE
CWE-407
Published
Advisory Summary

GHSA-7vh7-fw88-wj87 is a MODERATE denial of service vulnerability (CWE-407: Inefficient Algorithmic Complexity) affecting Commonmarker libraries in the RubyGems ecosystem. The issue involves several quadratic complexity bugs may lead to denial of service in commonmarker. Remediation is available by upgrading affected packages to version 0.23.10.

GHSA-7vh7-fw88-wj87 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7vh7-fw88-wj87
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-407: Inefficient Algorithmic Complexity
Affected Product Commonmarker
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix GHSA-7vh7-fw88-wj87

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.10
Upgrade commonmarker to 0.23.10
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-7vh7-fw88-wj87, 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.10), 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-407: Inefficient Algorithmic Complexity, where an algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached. 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 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-37463](https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5) For more information, consult the release notes for version [`0.29.0.gfm.12`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.12). ## Mitigation Users are advised to upgrade to commonmarker version [`0.23.10`](https://rubygems.org/gems/commonmarker/versions/0.23.10).

GHSA-7vh7-fw88-wj87 Affected Commonmarker Versions

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

References

Frequently Asked Questions

What is GHSA-7vh7-fw88-wj87?
GHSA-7vh7-fw88-wj87 is a security vulnerability in Commonmarker involving Several quadratic complexity bugs may lead to denial of service in Commonmarker under CWE-407: Inefficient Algorithmic Complexity.
Which Commonmarker versions are affected?
Affected versions include releases prior to 0.23.10 across affected packages: commonmarker.
What version fixes GHSA-7vh7-fw88-wj87?
Upgrading to 0.23.10 (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.10. Upgrade your dependency to 0.23.10 or later.
What CWE is associated with GHSA-7vh7-fw88-wj87?
GHSA-7vh7-fw88-wj87 is classified under CWE-407: Inefficient Algorithmic Complexity (An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.).
How can I check RubyGems dependencies for GHSA-7vh7-fw88-wj87?
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-7vh7-fw88-wj87",
  "modified" : "2023-08-08T17:12:00Z",
  "published" : "2023-08-08T17:12:00Z",
  "aliases" : [ ],
  "summary" : "Several quadratic complexity bugs may lead to denial of service in Commonmarker",
  "details" : "## Impact\n\nSeveral 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.\n\nThe following vulnerabilities were addressed:\n\n* [CVE-2023-37463](https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5)\n\nFor more information, consult the release notes for version [`0.29.0.gfm.12`](https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.12).\n\n## Mitigation\n\nUsers are advised to upgrade to commonmarker version [`0.23.10`](https://rubygems.org/gems/commonmarker/versions/0.23.10).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "commonmarker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.23.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gjtorikian/commonmarker/security/advisories/GHSA-7vh7-fw88-wj87"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gjtorikian/commonmarker/commit/db8cd377b54541f7fd484d168b7682a282a680f7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.12"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gjtorikian/commonmarker"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/commonmarker/versions/0.23.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-407" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-08T17:12:00Z",
    "nvd_published_at" : null
  }
}