hsec-2025-0007
Vulnerability from osv_haskell
Published
2025-12-27 08:58
Modified
2025-12-27 08:58
Summary
cmark-gfm: resource exhaustion due to quadratic complexity in parser
Details

cmark-gfm: resource exhaustion due to quadratic complexity in parser

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, due to quadratic complexity issues when parsing text which leads with either large numbers of > or - characters.

The Haskell cmark-gfm package bundles the C sources and was affected by this issue. This fix was released in the upstream C package at version 0.29.0.gfm.10. Version 0.2.6 of the Haskell package adopted the fix (moving from 0.29.0.gfm.6 to 0.29.0.gfm.13). Packages that depend on cmark-gfm should update to 0.2.6 or later.

Users unable to update should avoid processing data from untrusted sources or validate the input with other tools before using cmark-gfm to parse it.

Pandoc < 2.10.1 depended on cmark-gfm and could be affected by this issue.


{
  "affected": [
    {
      "database_specific": {
        "human_link": "https://github.com/haskell/security-advisories/tree/main/advisories/published/2025/HSEC-2025-0007.md",
        "osv": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export/2025/HSEC-2025-0007.json"
      },
      "package": {
        "ecosystem": "Hackage",
        "name": "cmark-gfm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.1.0"
            },
            {
              "fixed": "0.2.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "type": "CVSS_V3"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-24824",
    "GHSA-66g8-4hjf-77xh"
  ],
  "database_specific": {
    "home": "https://github.com/haskell/security-advisories",
    "osvs": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export",
    "repository": "https://github.com/haskell/security-advisories"
  },
  "details": "# cmark-gfm: resource exhaustion due to quadratic complexity in parser\n\n*cmark-gfm* is GitHub\u0027s fork of *cmark*, a CommonMark parsing and\nrendering library and program in C.  A polynomial time complexity\nissue in cmark-gfm may lead to unbounded resource exhaustion and\nsubsequent denial of service, due to quadratic complexity issues\nwhen parsing text which leads with either large numbers of `\u003e` or\n`-` characters.\n\nThe Haskell *cmark-gfm* package bundles the C sources and was\naffected by this issue.  This fix was released in the upstream C\npackage at version `0.29.0.gfm.10`.  Version `0.2.6` of the Haskell\npackage adopted the fix (moving from `0.29.0.gfm.6` to\n`0.29.0.gfm.13`).  Packages that depend on *cmark-gfm* should update\nto `0.2.6` or later.\n\nUsers unable to update should avoid processing data from untrusted\nsources or validate the input with other tools before using\n*cmark-gfm* to parse it.\n\nPandoc `\u003c 2.10.1` depended on *cmark-gfm* and could be affected by\nthis issue.\n",
  "id": "HSEC-2025-0007",
  "modified": "2025-12-27T08:58:56Z",
  "published": "2025-12-27T08:58:56Z",
  "references": [
    {
      "type": "FIX",
      "url": "https://github.com/kivikakk/cmark-gfm-hs/commit/1359b8740c6b29dde0ad8f816531112b32eb8cbe"
    },
    {
      "type": "FIX",
      "url": "https://github.com/github/cmark-gfm/commit/2300c1bd2c8226108885bf019655c4159cf26b59"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24824"
    }
  ],
  "schema_version": "1.5.0",
  "summary": "cmark-gfm: resource exhaustion due to quadratic complexity in parser"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…