Intel

AIKIDO-2026-233271

league/html-to-markdown is vulnerable to Denial of Service (DoS)

GHSA-h3wg-gqjr-jjmwPublished Oct 20, 2026
October 20, 2026

53

CVE Score

Medium

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the league/html-to-markdown library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Versions

2.0.0 - 5.1.3

Fixed in 5.1.4

Background info

league/html-to-markdown is vulnerable to Denial of Service (DoS) in versions 2.0.0 - 5.1.3.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea