High · 7.5 Node.js & npm CVE-2026-111766 GHSA-vfgh-jcmw-g37q GHSA-gfr2-rv44-r23c CVE-2026-111758
Two markdown-it Denial-of-Service Flaws Fixed in Versions 14.3.3 and 15.0.3
markdown-it, a widely used npm Markdown parser, contained two separate quadratic-time parsing bugs that could let attacker-supplied Markdown cause excessive CPU usage and denial of service. Both are fixed in versions 14.3.3 and 15.0.3.
By PatchBriefing · ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
markdown-it is a Markdown parser distributed as an npm package. Two independent vulnerabilities have been identified that allow specially crafted Markdown input to trigger quadratic-time (O(n²)) processing instead of the expected linear-time parsing. Both issues can be used to cause denial of service by consuming excessive CPU time, and both have been resolved in versions 14.3.3 and 15.0.3 of the package.
What happened
Two distinct denial-of-service vulnerabilities were identified in markdown-it. The first (CVE-2026-111766) affects inline HTML parsing when the html option or the commonmark preset is enabled: Markdown containing repeated unterminated inline HTML comments, processing instructions, declarations, or CDATA sections inside a paragraph can trigger quadratic-time processing. The second (CVE-2026-111758) affects the default configuration and is triggered by a single multi-line link reference definition whose label or title is never closed, also resulting in quadratic-time processing. Both issues can cause denial of service through event-loop blocking or an unresponsive browser main thread when the parser runs in a browser context.
Technical cause
For CVE-2026-111766, the issue lies in src/rules_inline/html_inline.ts. Its HTML_TAG_RE regular expression searches the remaining input suffix for the appropriate terminator; when no terminator is found, parsing advances to the next opener and repeats the match over overlapping input, producing quadratic-time behavior. This path is only reachable when the html option or commonmark preset is enabled and the affected constructs occur inside a paragraph; HTML blocks and the default HTML-disabled configuration are not affected. For CVE-2026-111758, the cause is in src/rules_block/reference.ts, where continuation lines of a link reference definition are pulled lazily using string concatenation (str += lineContent). Subsequent charCodeAt and slice calls flatten the underlying V8 cons-string, copying everything collected so far, and this copying occurs before the rule determines that the definition is actually invalid. Unlike the inline HTML issue, this one requires no special options and is triggered under default settings.
Why it matters
Both vulnerabilities allow an attacker to supply Markdown text that causes processing time to grow quadratically with input size rather than linearly. Depending on where markdown-it is used, this can block a server's event loop or freeze a browser tab's main thread, resulting in denial of service for the application or users interacting with it. Neither vulnerability affects confidentiality or integrity of data; both are limited to availability impact.
Who is affected
Applications using the markdown-it npm package to render untrusted or attacker-influenced Markdown input are affected. For CVE-2026-111766, exposure requires the html option or commonmark preset to be enabled; the default HTML-disabled configuration is not affected by the inline HTML payloads. For CVE-2026-111758, no special configuration is required — default options are sufficient to trigger the quadratic-time behavior via a crafted link reference definition.
Affected versions
For CVE-2026-111766 (inline HTML parsing), versions of markdown-it prior to 14.3.3, and versions from 15.0.0 up to but not including 15.0.3, are affected. For CVE-2026-111758 (link reference definition parsing), versions from 14.1.0 up to but not including 14.3.3, and versions from 15.0.0 up to but not including 15.0.3, are affected.
Fixes and mitigation
Both vulnerabilities are fixed in markdown-it versions 14.3.3 and 15.0.3. Upgrading to one of these fixed versions resolves both issues.
Recommended action
Upgrade markdown-it to version 14.3.3 or 15.0.3 (or later, once available) as soon as practical, especially for applications that enable the html option or commonmark preset, or that render Markdown from untrusted sources. If immediate upgrading is not possible, consider limiting the size or complexity of Markdown input accepted from untrusted users as a temporary mitigation.
PatchBriefing score
7.5 / 10 · High
Official CVSS: 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS 0.0063 (45 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- markdown-it >= 15.0.0, < 15.0.3
- vulnerable
- markdown-it ≥ 15.0.0 < 15.0.3
- vulnerable
- ≥ 14.3.3
- patched
- ≥ 15.0.3
- patched
- markdown-it >= 15.0.0, < 15.0.3
- vulnerable
- markdown-it ≥ 15.0.0 < 15.0.3
- vulnerable
- ≥ 14.3.3
- patched
- ≥ 15.0.3
- patched
Reported fixes
Both vulnerabilities are fixed in markdown-it versions 14.3.3 and 15.0.3. Upgrading to one of these fixed versions resolves both issues.
How this was built
6 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
-
GitHub Advisory Database database
-
GitHub Advisory Database database
-
OSV.dev database
-
OSV.dev database
-
NVD (NIST) database
Revision history
- Published
- Generated
- Published
- Generated
- Published
- Generated