Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS02dmZjLXF2M2YtdnI2Y80hTA

Uncontrolled Resource Consumption in markdown-it

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: https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101

Permalink: https://github.com/advisories/GHSA-6vfc-qv3f-vr6c
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS02dmZjLXF2M2YtdnI2Y80hTA
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 2 years ago
Updated: 9 months ago


CVSS Score: 5.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Identifiers: GHSA-6vfc-qv3f-vr6c, CVE-2022-21670
References: Repository: https://github.com/markdown-it/markdown-it
Blast Radius: 28.2

Affected Packages

npm:markdown-it
Dependent packages: 8,475
Dependent repositories: 205,037
Downloads: 26,108,094 last month
Affected Version Ranges: < 12.3.2
Fixed in: 12.3.2
All affected versions: 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.1.0, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.1, 4.2.2, 4.3.0, 4.3.1, 4.4.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 8.2.2, 8.3.0, 8.3.1, 8.3.2, 8.4.0, 8.4.1, 8.4.2, 9.0.0, 9.0.1, 9.1.0, 10.0.0, 11.0.0, 11.0.1, 12.0.0, 12.0.1, 12.0.2, 12.0.3, 12.0.4, 12.0.5, 12.0.6, 12.1.0, 12.2.0, 12.3.0, 12.3.1
All unaffected versions: 12.3.2, 13.0.0, 13.0.1, 13.0.2, 14.0.0, 14.1.0