---
id: CVE-2026-71488
title: >-
  league/commonmark is a PHP library for parsing and rendering CommonMark
  Markdown
summary: >-
  league/commonmark is a PHP library for parsing and rendering CommonMark
  Markdown. From 0.6.0 until 2.9.0, specially crafted Markdown lines can cause
  the parser to have quadratic time complexity when converting, because several
  parsing pa…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-407
  - CWE-1050
vendor: league
product: league/commonmark
affected:
  - 'league/commonmark >= 0.6.0, < 2.9.0'
patched:
  - league/commonmark 2.9.0
published: '2026-08-06'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T20:41:33.140'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-71488'
references:
  - url: >-
      https://github.com/thephpleague/commonmark/commit/a6ef6cdc308dfa39a34239c35818e75892a0e6a8
    label: security-advisories@github.com
  - url: >-
      https://github.com/thephpleague/commonmark/commit/a70979ea0d7d3377bd7127536748454a922bf5eb
    label: security-advisories@github.com
  - url: >-
      https://github.com/thephpleague/commonmark/commit/c97b02e5e652b992033b93ba5d6182f706343fc6
    label: security-advisories@github.com
  - url: 'https://github.com/thephpleague/commonmark/releases/tag/2.9.0'
    label: security-advisories@github.com
  - url: >-
      https://github.com/thephpleague/commonmark/security/advisories/GHSA-2q4p-g7hv-5rgv
    label: security-advisories@github.com
  - url: 'https://github.com/advisories/GHSA-2q4p-g7hv-5rgv'
tags:
  - nvd
  - ghsa
  - composer
epss: 0.0063
epssPercentile: 0.47969
aliases:
  - GHSA-2q4p-g7hv-5rgv
ecosystem: composer
ingestedAt: '2026-08-06T21:04:22.068Z'
---

## Overview

league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 0.6.0 until 2.9.0, specially crafted Markdown lines can cause the parser to have quadratic time complexity when converting, because several parsing paths repeatedly rescan growing portions of a line to translate between character positions and byte positions, and the Autolink extension can also copy and validate the remaining line at every URL-like prefix, allowing an attacker who can submit Markdown for conversion to consume disproportionate CPU time with a comparatively small request. This issue is fixed in 2.9.0.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-71488)

Affected packages:

- `league/commonmark >= 0.6.0, < 2.9.0`

Patched in:

- `league/commonmark 2.9.0`

Source: https://github.com/advisories/GHSA-2q4p-g7hv-5rgv
