markdown-it linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds
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.
AI Analysis
Technical Summary
The markdown-it library has two separate quadratic complexity issues in its linkify: true handling. First, the arrayReplaceAt function is called repeatedly per linkified text token, rebuilding a large children array multiple times, causing O(N^2) behavior when many soft-broken lines are present. Second, a regex match on the input string is performed repeatedly at every '://' occurrence without truncation unless a link is produced, causing repeated rescanning and further quadratic complexity. These inefficiencies cause the event loop to be blocked for tens of seconds on inputs of a few hundred KB, severely impacting availability. The problem is in markdown-it's own code, not in the linkify-it dependency, and only affects usage with linkify enabled.
Potential Impact
This vulnerability causes significant availability degradation by blocking the Node.js event loop for tens of seconds when processing markdown inputs of a few hundred KB with linkify enabled. The blocking time grows quadratically with input size, making the application unresponsive during processing. There is no impact on confidentiality, integrity, or code execution. The issue only affects applications that explicitly enable the linkify option, which is off by default.
Mitigation Recommendations
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.
markdown-it linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds
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.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The markdown-it library has two separate quadratic complexity issues in its linkify: true handling. First, the arrayReplaceAt function is called repeatedly per linkified text token, rebuilding a large children array multiple times, causing O(N^2) behavior when many soft-broken lines are present. Second, a regex match on the input string is performed repeatedly at every '://' occurrence without truncation unless a link is produced, causing repeated rescanning and further quadratic complexity. These inefficiencies cause the event loop to be blocked for tens of seconds on inputs of a few hundred KB, severely impacting availability. The problem is in markdown-it's own code, not in the linkify-it dependency, and only affects usage with linkify enabled.
Potential Impact
This vulnerability causes significant availability degradation by blocking the Node.js event loop for tens of seconds when processing markdown inputs of a few hundred KB with linkify enabled. The blocking time grows quadratically with input size, making the application unresponsive during processing. There is no impact on confidentiality, integrity, or code execution. The issue only affects applications that explicitly enable the linkify option, which is off by default.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-253c-mchw-3w2r
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6abc27cf680226ef6846f924
Added to database: 09/29/2026, 21:04:15 UTC
Last enriched: 09/29/2026, 21:22:42 UTC
Last updated: 09/30/2026, 03:13:18 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.