NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2021-21306 — marked

HIGHFix: markedjs/marked@7293251

CVE-2021-21306 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in marked. A fix is available for marked — see the affected versions and patch details below.

Regular Expression Denial of Service (REDoS) in Marked

Also known asGHSA-4r62-v4vq-hr96
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.5%probability of exploitation in next 30 days
Lower Risk+0.03%
Lower risk than most CVEs85th percentile — riskier than 85% of all scored CVEsHighest risk
0.04%1.04%2.05%3.06%0.6%2.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

15Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
markednpm
123.6Mdownloads / week

Description

Impact

What kind of vulnerability is it? Who is impacted?

Regular expression Denial of Service

A Denial of Service attack can affect anyone who runs user generated code through marked.

Patches

Has the problem been patched? What versions should users upgrade to?

patched in v2.0.0

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

None.

References

Are there any links users can visit to find out more?

https://github.com/markedjs/marked/issues/1927 https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmmarked≥ 1.1.1&&< 2.0.02.0.0npm install marked@2.0.0

Affected Products

1 product · 1 configurations
Application
markedmarked_project
≥ 1.1.1 && < 2.0.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for marked, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update marked to 2.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21306 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Impact _What kind of vulnerability is it? Who is impacted?_ [Regular expression Denial of Service](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) A Denial of Service attack can affect anyone who runs user generated code through `marked`. ### Patches _Has the problem been patched? What versions should users upgrade to?_ patched in v2.0.0 ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ None. ### References _Are there any links users can visit to find out more?_ https://github.com/markedjs/marke
O3 Security · Impact-Aware SCA

Is CVE-2021-21306 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-21306: marked DoS — Fixed in 2.0.0