Inefficient regular expression complexity in markdown-it - CVE-2022-21670
Published: January 8, 2022 / Updated: April 24, 2026
markdown-it
markdown-it
Description
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to inefficient regular expression complexity in newline rule when parsing specially crafted markdown input. A remote attacker can send specially crafted input to cause a denial of service.
Inputs containing special patterns with lengths greater than 50,000 characters can significantly slow down the parser.