Skip to content

Uncontrolled Resource Consumption in markdown-it

Moderate severity GitHub Reviewed Published Jan 8, 2022 in markdown-it/markdown-it • Updated Jul 24, 2023

Package

npm markdown-it (npm)

Affected versions

< 12.3.2

Patched versions

12.3.2

Description

Impact

Special patterns with length > 50K chars can slow down parser significantly.

const md = require('markdown-it')();

md.render(`x ${' '.repeat(150000)} x  \nx`);

Patches

Upgrade to v12.3.2+

Workarounds

No.

References

Fix + test sample: markdown-it/markdown-it@ffc49ab

References

@puzrin puzrin published to markdown-it/markdown-it Jan 8, 2022
Published by the National Vulnerability Database Jan 10, 2022
Reviewed Jan 10, 2022
Published to the GitHub Advisory Database Jan 12, 2022
Last updated Jul 24, 2023

Severity

Moderate
5.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVE ID

CVE-2022-21670

GHSA ID

GHSA-6vfc-qv3f-vr6c

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.