markdown-it: Quadratic-time denial of service in inline HTML parsing with html enabled (CVE-2026-111766)
Description
markdown-it versions prior to 14.3.3 and from 15.0.0 up to but not including 15.0.3 have a vulnerability where enabling HTML parsing causes quadratic-time denial of service during inline HTML parsing. Specifically, repeated unterminated HTML constructs such as comments, processing instructions, declarations, and CDATA sections cause the parser to perform excessive repeated scans, blocking the Node.js event loop for seconds or tens of seconds. The default configuration disables HTML, but the commonmark preset enables it, making some applications vulnerable. A fix is available.
CVSS v3.1
Score 3.7low
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
markdown-it with the option html: true enabled suffers from a quadratic-time denial of service vulnerability in inline HTML parsing. The parser attempts to match repeated unterminated HTML constructs (comments, processing instructions, declarations, CDATA) inside paragraphs. When terminators are missing, the parser repeatedly scans overlapping input suffixes, causing quadratic complexity. This leads to significant blocking of the Node.js event loop with attacker-controlled input of a few hundred kilobytes. The issue affects markdown-it versions <14.3.3 and >=15.0.0 <15.0.3. The default configuration disables HTML parsing, but the commonmark preset enables it. The vulnerability was confirmed on [email protected] with Node.js 20 and 24.16.0. A patch is available to avoid repeated failed searches by caching failed attempts across all four affected HTML constructs.
Potential Impact
This vulnerability causes availability degradation by blocking the Node.js event loop for seconds to tens of seconds when parsing crafted Markdown input with html: true enabled. It affects applications that render attacker-controlled Markdown with this setting, including those using the commonmark preset. The impact is limited to denial of service (no confidentiality or integrity impact). The CVSS score is 3.7 (low) due to network attack vector, high attack complexity, no privileges required, no user interaction, and only availability impact.
Mitigation Recommendations
A patch is available for markdown-it that addresses this quadratic-time denial of service issue. Users should upgrade to a fixed version (>=14.3.3 or >=15.0.3). If upgrading is not immediately possible, disabling HTML parsing (html: false) prevents this issue, as the default configuration does. Applications using the commonmark preset should be especially cautious and consider disabling HTML or applying the patch. No other mitigations are specifically recommended.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-vfgh-jcmw-g37q
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-111766"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- LOW
- Cvss Version
- 3.1
Threat ID: 6ad7ec462cdf04f6566b9f93
Added to database: 10/20/2026, 22:33:42 UTC
Last enriched: 10/20/2026, 22:43:05 UTC
Last updated: 10/20/2026, 22:43:05 UTC
Views: 3
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.