Thephpleague commonmark
commonmark before 2.9.1 Denial of Service via SmartPunct and Attributes
The league/commonmark (thephpleague/commonmark) library in versions >= 1.5.0 and < 2.9.1 contains quadratic parsing complexity in its SmartPunctExtension and AttributesExtension. When either extension is explicitly registered on the Environment (they are not enabled by default and are excluded from the standard CommonMark and GitHub-Flavored Markdown converters), an unauthenticated attacker can submit small, specially crafted Markdown documents — such as text alternating with unpaired quotes, contiguous runs of block-level attribute blocks, or repeated class attributes — to trigger disproportionate CPU consumption and cause a denial of service. Fixed in 2.9.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.5.0, < 2.9.1
Fixed in 2.9.1
Mitigation
Upgrade commonmark to 2.9.1 or later.
References
- Vendor advisory github.com/thephpleague/commonmark/security/ad…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.