league/html-to-markdown is vulnerable to Denial of Service (DoS)
53
CVE Score
Medium
Denial of Service (DoS)
HtmlConverter processes each element in src/Element.php using the size of the whole document or the full sibling count, instead of the element alone. Converting untrusted HTML with many list items, preserved tags, <pre>/<code> blocks, or table rows takes time proportional to the square of their count and holds a PHP worker for a long time, because there is no element count or size limit. An 80 KB ordered list of 8,000 items takes 18-25 seconds to convert. The fix adds a sibling position cache, runs DOM canonicalization on a single element instead of the whole document, and uses a cheaper replaceChild path on older PHP versions so conversion time stays proportional to input size.
Upgrade the league/html-to-markdown library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
2.0.0 - 5.1.3
Fixed in 5.1.4league/html-to-markdown is vulnerable to Denial of Service (DoS) in versions 2.0.0 - 5.1.3.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.