Description
league/commonmark 2.6.0 before 2.10.8 contains a denial of service vulnerability in DelimiterStack::push() that miscounts delimiter runs against the max_delimiters_per_line budget. Attackers submitting Markdown with two long emphasis character runs can produce deeply nested strong elements, causing quadratic rendering time and CPU exhaustion.
Affected products and versions
thephpleague commonmark2.6.0 – < 2.10.8Fixed in: 2.10.8
CVSS vector, explained
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack vector
- Network (from the internet)
- Attack complexity
- High
- Privileges required
- None (no login)
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- None
- Integrity
- None
- Availability
- Low impact
Weakness type (CWE)
- CWE-770 Allocation of Resources Without Limits or Throttling
References
- github.com/thephpleague/commonmark/security/advisories/GHSA-h4px-59g8-q37c vendor advisory
- github.com/thephpleague/commonmark/commit/eb208506ff62b871d14bf5b086ae83405e23190e patch
- github.com/thephpleague/commonmark/releases/tag/2.10.8
- github.com/thephpleague/commonmark/blob/2.10.7/src/Delimiter/DelimiterStack.php#L57-L61
- www.vulncheck.com/advisories/league-commonmark-2.6.0-before-2.10.8-denial-of-service-via-m
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.