Vulnerability library
Security checkJune 15, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmmarkdown-it

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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:

  • Affected version(s): <= 14.1.1
  • Patched version(s): 14.2.0

References

Could your website be exposed too?

SmartScanner can check your website for markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated June 15, 2026