CVE-2021-21306
HIGH 7.5CVSS 3.1Regular Expression Denial of Service (REDoS) in Marked
Marked is an open-source markdown parser and compiler (npm package "marked"). In marked from version 1.1.1 and before version 2.0.0, there is a Regular expression Denial of Service vulnerability. This vulnerability can affect anyone who runs user generated code through marked. This vulnerability is fixed in version 2.0.0.
- Published
- 8 Feb 2021
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-400
- Also known as
- GHSA-4r62-v4vq-hr96
- Sources
- NVDJSONOSV GHSA-4r62-v4vq-hr96JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | marked_project | markedcpe:2.3:a:marked_project:marked:*:*:*:*:*:node.js:*:* |
>= 1.1.1, < 2.0.0 | 2.0.0 |
| OSV | npm | marked | >= 1.1.1, < 2.0.0 | 2.0.0 |
References
- https://github.com/markedjs/marked/commit/7293251c438e3ee968970f7609f1a27f9007bccd · Patch, Third Party Advisory, WEB
- https://github.com/markedjs/marked/issues/1927 · Third Party Advisory, WEB
- https://github.com/markedjs/marked/pull/1864 · Patch, Third Party Advisory, WEB
- https://github.com/markedjs/marked/security/advisories/GHSA-4r62-v4vq-hr96 · Third Party Advisory, WEB
- https://www.npmjs.com/package/marked · Product, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21306 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 8 Feb 2021)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 8 Feb 2021)