Advisory

GHSA-6vfc-qv3f-vr6c

Also known as: CVE-2022-21670

Summary

Uncontrolled Resource Consumption in markdown-it

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-01-12 22:20 UTC
Modified
2023-11-08 04:08 UTC

Affected packages and fixes

markdown-it

npm · All systems

Affected

  • introduced 0, fixed 12.3.2 (semver)

Fixed versions

12.3.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences