CVE-2026-111759: markdown-it Quadratic Complexity Vulnerability

HIGH
Advisory Identifier: GHSA-r7fv-28h4-cvq7
CVSS 7.5
CWE-400 CWE-407
Published
Advisory Summary

CVE-2026-111759 is a HIGH (CVSS 7.5) quadratic complexity vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting markdown-it libraries in the npm ecosystem. The issue involves quadratic complexity in smartquotes with unmatched closing quotes. Remediation is available by upgrading affected packages to version 15.0.2, 14.3.2.

CVE-2026-111759 at a Glance

CVE Identifier CVE-2026-111759
GHSA Identifier GHSA-r7fv-28h4-cvq7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product markdown-it
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-111759

To remediate this vulnerability, upgrade all affected markdown-it dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

markdown-it fixed: 15.0.2
npm install markdown-it@15.0.2
markdown-it fixed: 14.3.2
npm install markdown-it@14.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls markdown-it

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-111759, inspect your project dependencies using npm:

npm ls markdown-it

Analyze the terminal output to locate any version of markdown-it in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 15.0.2), your application is affected.

Note: The npm ls markdown-it command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In markdown-it, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When `typographer: true` is enabled, specially crafted Markdown can cause quadratic processing time in the smartquotes rule, potentially leading to denial of service in applications processing untrusted input. Many opening double quotes followed by unmatched closing single quotes cause repeated scans of the entire opener stack. The same issue occurs with the quote types reversed. The default configuration (`typographer: false`) is not affected, but this option is enabled with high probability. ### Reproduction ```js import MarkdownIt from 'markdown-it' import { performance } from 'node:perf_hooks' const md = new MarkdownIt({ typographer: true }) for (const k of [2000, 4000, 8000, 16000, 32000]) { const input = '"a '.repeat(k) + "b' ".repeat(k) const start = performance.now() md.render(input) console.log(input.length, (performance.now() - start).toFixed(1), 'ms') } ``` Result: |input size|time| |-|-| |12000|18ms| |24000|47ms| |48000|115ms| |96000|428ms| |192000|1586ms| ### Patches Fixed in **15.0.2** and **14.3.2**. ### Workarounds Disable typography with `typographer: false`, or disable only the smartquotes rule: ```js md.disable('smartquotes') ```

CVE-2026-111759 Affected markdown-it Versions

2 component(s)
Fixed Versions:
15.0.214.3.2
Product / Package Ecosystem Affected Versions Fixed Version
markdown-it
npm
≥ 15.0.0
< 15.0.2
15.0.2
markdown-it
npm
< 14.3.2
14.3.2

References

Frequently Asked Questions

What is CVE-2026-111759?
CVE-2026-111759 is a security vulnerability in markdown-it involving Quadratic complexity in smartquotes with unmatched closing quotes under CWE-400: Uncontrolled Resource Consumption.
Which markdown-it versions are affected?
Affected versions include releases prior to 15.0.2, 14.3.2 across affected packages: markdown-it.
What version fixes CVE-2026-111759?
Upgrading to 15.0.2, 14.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is markdown-it affected?
Yes, markdown-it is affected in releases prior to 15.0.2, 14.3.2. Upgrade your dependency to 15.0.2, 14.3.2 or later.
What is the CVSS score of CVE-2026-111759?
CVE-2026-111759 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-111759?
CVE-2026-111759 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-111759?
Run the dependency tree command: 'npm ls markdown-it'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r7fv-28h4-cvq7",
  "modified" : "2026-10-20T14:34:51Z",
  "published" : "2026-10-20T14:34:50Z",
  "aliases" : [ "CVE-2026-111759" ],
  "summary" : "markdown-it: Quadratic complexity in smartquotes with unmatched closing quotes",
  "details" : "### Impact\n\nWhen `typographer: true` is enabled, specially crafted Markdown can cause quadratic processing time in the smartquotes rule, potentially leading to denial of service in applications processing untrusted input.\n\nMany opening double quotes followed by unmatched closing single quotes cause repeated scans of the entire opener stack. The same issue occurs with the quote types reversed.\n\nThe default configuration (`typographer: false`) is not affected, but this option is enabled with high probability.\n\n### Reproduction\n\n```js\nimport MarkdownIt from 'markdown-it'\nimport { performance } from 'node:perf_hooks'\n\nconst md = new MarkdownIt({ typographer: true })\n\nfor (const k of [2000, 4000, 8000, 16000, 32000]) {\n  const input = '\"a '.repeat(k) + \"b' \".repeat(k)\n  const start = performance.now()\n  md.render(input)\n  console.log(input.length, (performance.now() - start).toFixed(1), 'ms')\n}\n```\n\nResult:\n\n|input size|time|\n|-|-|\n|12000|18ms|\n|24000|47ms|\n|48000|115ms|\n|96000|428ms|\n|192000|1586ms|\n\n### Patches\n\nFixed in **15.0.2** and **14.3.2**.\n\n### Workarounds\n\nDisable typography with `typographer: false`, or disable only the smartquotes rule:\n\n```js\nmd.disable('smartquotes')\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "markdown-it"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0.0"
      }, {
        "fixed" : "15.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "markdown-it"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/security/advisories/GHSA-r7fv-28h4-cvq7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-111759"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/commit/1b379c1b6d0522421bd1a51b77337c79af2c8670"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/commit/cf27366035edf9196667110c47d9d67b030a4152"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/commit/daf5a3c32303e5d9de01b12eeb725fb5990b8162"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/markdown-it/markdown-it"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/releases/tag/14.3.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markdown-it/markdown-it/releases/tag/15.0.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-407" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-20T14:34:50Z",
    "nvd_published_at" : "2026-10-19T18:17:00Z"
  }
}