---
title: "GHSA-6vfc-qv3f-vr6c: Uncontrolled Resource Consumption in markdown-it"
description: "Moderate severity. Uncontrolled Resource Consumption in markdown-it. Affects markdown-it; fixed in 12.3.2."
url: https://inlinr.com/advisories/GHSA-6vfc-qv3f-vr6c
lang: en
---

[Packages](https://inlinr.com/packages) / [markdown-it](https://inlinr.com/packages/markdown-it) / [Security](https://inlinr.com/packages/markdown-it/security)

Moderate Vulnerability GHSA-6vfc-qv3f-vr6c CVE-2022-21670 Published 12 Jan 2022

# Uncontrolled Resource Consumption in markdown-it

Your version 

Affected releases · [markdown-it](https://inlinr.com/packages/markdown-it)

- 12.x 12.0.0 – 12.3.1 Fixed in 12.3.2
- 11.x and older 2.0.0 – 11.0.1 No fix, no longer updated

On 12.x, the newest line:

```
npm install markdown-it@12.3.2
```

Every release on a timeline

15.x 

1. Not affected

15.0.0 – 15.0.3  
4 releases, latest

12.x 

1. Affected

12.0.0 – 12.3.1  
11 releases
2. Fixed

12.3.2  
1 release

11.x 

1. Affected

11.0.0 – 11.0.1  
2 releases

10.x 

1. Affected

10.0.0  
1 release

9.x 

1. Affected

9.0.0 – 9.1.0  
3 releases

8.x 

1. Affected

8.0.0 – 8.4.2  
12 releases

7.x 

1. Affected

7.0.0 – 7.0.1  
2 releases

6.x 

1. Affected

6.0.0 – 6.1.1  
8 releases

5.x 

1. Affected

5.0.0 – 5.1.0  
5 releases

4.x 

1. Affected

4.0.0 – 4.4.0  
13 releases

3.x 

1. Affected

3.0.0 – 3.1.0  
9 releases

2.x 

1. Affected

2.0.0 – 2.2.1  
7 releases

89 stable releases of markdown-it, oldest to newest, one row per major.

## What happens

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: [ffc49ab](https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101 "https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101")

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **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

## References

- [Reference](https://github.com/markdown-it/markdown-it/security/advisories/GHSA-6vfc-qv3f-vr6c "https://github.com/markdown-it/markdown-it/security/advisories/GHSA-6vfc-qv3f-vr6c")  
github.com/markdown-it/markdown-it/security/adv…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-21670 "https://nvd.nist.gov/vuln/detail/CVE-2022-21670")  
nvd.nist.gov/vuln/detail/CVE-2022-21670
- [Fix commit](https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101 "https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101")  
ffc49ab
- [Package](https://github.com/markdown-it/markdown-it "https://github.com/markdown-it/markdown-it")  
github.com/markdown-it/markdown-it

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
