What’s Vulnerable › Vulnerabilities
CVE-2026-48988: markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-06-17 · updated 2026-06-24
- Weakness: CWE-400
Description
markdown-it is a Markdown parser. Versions 14.1.1 and below contain a denial-of-service vulnerability when typographer: true is enabled, due to quadratic (O(n^2)) processing in the smartquotes rule. The issue stems from repeatedly modifying strings with replaceAt(), which performs O(n) slicing and concatenation per quote character. This can cause excessive CPU consumption when parsing quote-heavy, user-supplied markdown and may let attackers degrade or disrupt service availability. Although typographer is disabled by default, many production apps enable it for smart typography, making the issue relevant. This issue has been fixed in version 14.2.0.
Affected products
- markdown-it: before 14.2.0 — fixed in 14.2.0
How to fix
Upgrade to a fixed version: markdown-it 14.2.0. Check the vendor advisory for mitigations.
References
- https://github.com/markdown-it/markdown-it/commit/9ce2087562c45d1e5ddd9f76b990f4b3fbe040e5
- https://github.com/markdown-it/markdown-it/security/advisories/GHSA-6v5v-wf23-fmfq
- https://github.com/markdown-it/markdown-it/security/advisories/GHSA-6v5v-wf23-fmfq
Get alerted when CVE-2026-48988 or the next vulnerability affects your stack