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
CVSS 6.3 Medium : upgrade to 14.3.1 when convenient.
Data as of 29 Sep 2026, 21:22 UTC
- 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:NWhat to do
Upgrade markdown-it to 14.3.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmmarkdown-it | Affected
| Fixed in
|
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
- github.com/markdown-it/markdown-it/security/advisories/GHSA-253c-mchw-3w2r (opens in a new tab)
- github.com/markdown-it/markdown-it/commit/09fa07118dda4c953f058848f53dae88395618ca (opens in a new tab)
- github.com/markdown-it/markdown-it/commit/aaadcfa6d817b3c5f89afb49d97c7b797a6dd4fd (opens in a new tab)
- github.com/markdown-it/markdown-it/commit/ad70f6b7cff64bee10e42a774147112480ca0d49 (opens in a new tab)
- github.com/markdown-it/markdown-it (opens in a new tab)