Inefficient regular expression complexity in markdown-it - CVE-2022-21670

 

Inefficient regular expression complexity in markdown-it - CVE-2022-21670

Published: January 8, 2022 / Updated: April 24, 2026


Vulnerability identifier: #VU127413
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-21670
CWE-ID: CWE-1333
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

markdown-it

How to mitigate CVE-2022-21670

Install security update from vendor's website.

markdown-it - update to 12.3.2

External References

Related Security Bulletins