High · 7.5 Node.js & npm CVE-2026-111759 GHSA-r7fv-28h4-cvq7
markdown-it ReDoS Vulnerability: Quadratic Complexity in Smartquotes Rule (CVE-2026-111759)
A denial-of-service flaw in markdown-it's smartquotes rule can cause quadratic processing time when the typographer option is enabled, allowing crafted input to exhaust CPU resources. Fixed in versions 14.3.2 and 15.0.2.
By PatchBriefing ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been identified in markdown-it, a widely used Markdown parser for JavaScript. The issue affects the library's smartquotes feature and can be triggered by specially crafted input, leading to excessive processing time. The vulnerability is tracked as CVE-2026-111759 (GHSA-r7fv-28h4-cvq7) and has been assigned a CVSS score of 7.5 (High) by the reporting source.
What happened
A quadratic-complexity issue was identified in the smartquotes rule of markdown-it. When the `typographer: true` option is enabled, specially crafted Markdown input — specifically, many opening double quotes followed by unmatched closing single quotes (or the same pattern with quote types reversed) — causes the parser to repeatedly scan the entire opener stack. This results in processing time that grows quadratically with input size, rather than linearly, which can lead to denial of service when the parser handles untrusted input.
Technical cause
The root cause is in how the smartquotes rule handles unmatched quote characters. Instead of terminating or bounding the scan when quotes cannot be matched, the algorithm repeatedly re-scans the stack of opening quotes, causing the time complexity to scale quadratically with the number of crafted quote characters in the input. The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption).
Who is affected
Applications using markdown-it to process untrusted Markdown input are at risk, provided the `typographer` option is enabled. The advisory notes that the default configuration has `typographer: false`, which is not affected. However, the advisory also states that this option is enabled with high probability in real-world deployments, meaning many applications relying on markdown-it for smart typography features could be impacted.
Affected versions
markdown-it versions prior to 14.3.2 are affected. Additionally, versions from 15.0.0 up to but not including 15.0.2 are affected. Versions before 15.0.0 (i.e., prior to the 15.x line) that are also below 14.3.2 fall under the first range. The vulnerability is fixed in versions 14.3.2 and 15.0.2.
Fixes and mitigation
The maintainers have released fixed versions: 14.3.2 and 15.0.2. Organizations using markdown-it should update to one of these fixed versions. As a temporary mitigation, disabling the `typographer` option (it is disabled by default) prevents exposure to this specific issue, though this removes smart typography features such as automatic smart quotes.
Recommended action
Update markdown-it to version 14.3.2 or 15.0.2, depending on which major version line is in use. If an immediate update is not possible, consider disabling the `typographer` option as a temporary measure while processing untrusted Markdown input, and review dependency manifests for any inherited exposure via other packages that bundle markdown-it.
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.0068 (48 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 < 14.3.2
- vulnerable
- markdown-it ≥ 0 < 14.3.2
- vulnerable
- ≥ 14.3.2
- patched
- ≥ 15.0.2
- patched
Reported fixes
The maintainers have released fixed versions: 14.3.2 and 15.0.2. Organizations using markdown-it should update to one of these fixed versions. As a temporary mitigation, disabling the `typographer` option (it is disabled by default) prevents exposure to this specific issue, though this removes smart typography features such as automatic smart quotes.
How this was built
3 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
-
GitHub Advisory Database database
-
OSV.dev database
Revision history
- Published
- Generated