Skip to main content
VulnerabilityPublished

markdown-it linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds

Affects markdown-itSource GCVE Database

0

CVSS 6.3 Medium : upgrade to 14.3.1 when convenient.

Data as of 29 Sep 2026, 21:22 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 14.3.1
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

What to do

Upgrade markdown-it to 14.3.1.

Affected software

ProductAffectedFixed in
npmmarkdown-itAffected
  • <14.3.1
Fixed in
  • 14.3.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available for this vulnerability. Users should upgrade markdown-it to version 15.0.1 or later, or any version after 14.3.1 where this issue is fixed. If upgrading is not immediately possible, disabling the linkify option will avoid the quadratic performance degradation. Since linkify is off by default, applications not enabling it are not affected.

Description

markdown-it versions prior to 15.0.1 and before 14.3.1 have two independent quadratic time complexity paths when the linkify option is enabled. This causes the event loop to be blocked for tens of seconds when processing a few hundred KB of markdown containing many linkifiable tokens, leading to availability degradation. The issue arises from inefficient array rebuilding and repeated regex matching in markdown-it's own code, not in the linkify-it dependency. The vulnerability affects only applications that enable the linkify option, which is off by default.

References

Community reviews

Loading reviews…