Vulnerabilities/

markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations

Severity:
Medium

Description

A quadratic time complexity vulnerability exists in markdown-it’s smartquotes rule (enabled via the typographer: true option). An attacker can craft a markdown input consisting of consecutive quotation marks that causes the parser to consume excessive CPU time, leading to denial of service.

Recommendation

Update the markdown-it package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
markdown-it
Anything's wrong? Let us know Last updated on June 15, 2026