Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. markdown-it
  4. ›
  5. CVE-2026-111758

CVE-2026-111758: markdown-it: Quadratic-time rendering of a single multi-line link reference definition with default options (regression since 14.0)

October 20, 2026

A link reference definition whose label or title is never closed is O(n²) in markdown-it 15.0.2 with default options. Continuation lines are pulled lazily with str += lineContent in src/rules_block/reference.ts, and the subsequent charCodeAt and slice calls flatten the V8 cons-string, copying everything collected so far; this runs before the rule decides the definition is invalid. It is a regression introduced by PR #1004 in 14.0.0: 13.0.2 processed a 313 KB input in 125 ms, while every version since takes about 11 seconds on the same input. At the sizes below, 200 KB takes 3.6 seconds, 400 KB takes 18.1 seconds, and 800 KB takes 74.0 seconds, which is roughly 4–5× per doubling. No options are required to trigger it.

References

  • github.com/advisories/GHSA-gfr2-rv44-r23c
  • github.com/markdown-it/markdown-it/commit/48fbc465812c440020c663f040ab22deaf8f1eca
  • github.com/markdown-it/markdown-it/commit/d99f48839d37af6fd8a2617516c43dab90755503
  • github.com/markdown-it/markdown-it/releases/tag/14.3.3
  • github.com/markdown-it/markdown-it/releases/tag/15.0.3
  • github.com/markdown-it/markdown-it/security/advisories/GHSA-gfr2-rv44-r23c
  • nvd.nist.gov/vuln/detail/CVE-2026-111758

Code Behaviors & Features

Detect and mitigate CVE-2026-111758 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 14.1.0 before 14.3.3, all versions starting from 15.0.0 before 15.0.3

Fixed versions

  • 14.3.3
  • 15.0.3

Solution

Upgrade to versions 14.3.3, 15.0.3 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/markdown-it/CVE-2026-111758.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:23 +0000.