VDB
KO
MEDIUM 5.3

GHSA-6vfc-qv3f-vr6c

Uncontrolled Resource Consumption in markdown-it

Details

### Impact

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

```js 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

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / markdown-it
Introduced in: 0 Fixed in: 12.3.2
Fix npm install markdown-it@12.3.2

References