LOWCVSS v3.1 3.7Vulnerability

CVE-2026-111766

### Summary With `html: true`, markdown-it takes quadratic time to parse repeated unterminated HTML constructs inside a paragraph. This affects HTML comments (`<!--`), processing instructions (`<?`), declarations (`<!A`), and CDATA sections (`<![CDATA[`). An attacker-controlled input of a few hundred kilobytes can block the Node.js event loop for seconds or tens of seconds. The default configuration has HTML disabled, but the `commonmark` preset enables it. The issue was reported against the published `[email protected]` package on Node.js 20 and reproduced on the current source with Node.js 24.16.0. ### Details `src/rules_inline/text.ts` treats `<` as a terminator, causing the inline parser to attempt the HTML rule at successive HTML construct openers. With HTML enabled, `src/rules_inline/html_inline.ts` applies an anchored regular expression to the remaining input: ```js const match = state.src.slice(pos).match(HTML_TAG_RE) ``` The comment, processing instruction, declaration, and CDATA alternatives in `src/common/html_re.ts` scan the remaining input for their respective terminators: `-->`, `?>`, `>`, and `]]>`. When the terminator is absent, matching fails. Parsing eventually reaches the next opener and scans an overlapping suffix again. Repeating this across the paragraph produces quadratic total work. For these inputs, the problem is repeated scanning across separate matches. The payload must reach inline parsing. Prefixing it with `x ` keeps it inside a paragraph. Starting a line directly with one of these constructs instead invokes HTML block parsing, which does not exhibit the same repeated inline scans for these payloads. The existing `unclosed <!--` test in `test/markdown-it/pathological.test.mjs` already contains a reproducer: ```js '</' + '<!--'.repeat(100000) ``` However, it runs with default options, where HTML is disabled. A fix should avoid repeated searches for absent terminators across all four affected alternatives, for example by c

Properties

Summary
markdown-it: Quadratic-time denial of service in inline HTML parsing with html enabled
Severity
low
Nvd fetched at
2026-10-20T21:14:08.448323+00:00
Epss score
0.0035
Cvss score
3.7
Cvss severity
LOW
Retrieved at
2026-10-21T01:24:48+00:00
Ghsa published
2026-10-20T20:08:19Z
Source url
https://github.com/advisories/GHSA-vfgh-jcmw-g37q
Ghsa updated
2026-10-20T20:08:20Z
Ghsa id
GHSA-vfgh-jcmw-g37q
Last source
FIRST EPSS
Score
3.7
Cvss version
3.1
Cve id
CVE-2026-111766
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
First seen by Signal
2026-10-20T00:27:55+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Published at
2026-10-19T20:17:52.247

Related Entities (4)

AFFECTS (1)

→[Software]npm/markdown-it

VULNERABLE_TO (1)

←[Software]npm/markdown-it

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-111766 (CVSS v3.1 3.7) — Ninja Signal Threat Intelligence | Ninja Signal