CVE-2022-21680
Cubic catastrophic backtracking (ReDoS) in marked
Reported by github_m · Published January 14, 2022
marked is fixed in 4.0.10 (npm)
Marked is a markdown parser and compiler. Prior to version 4.0.10, the regular expression `block.def` may cause catastrophic backtracking against some strings and lead to a regular expression denial of service (ReDoS). Anyone who runs untrusted markdown through a vulnerable version of marked and does not use a worker with a time limit may be affected. This issue is patched in version 4.0.10. As a workaround, avoid running untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| marked | npm | 4.0.10 |
| marked | NuGet | 4.0.10 |
| arangodb-3.12 | Chainguard | 3.12.9.4-r14 |
| marked | marked_project | 4.0.10 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| markedjs | marked | < 4.0.10 |
| chainguard | arangodb-3.12 | 0 |
| NuGet | marked | 0 |
| markedjs | marked | 0 |
| npm | marked | 0 |
Timeline
- Jan 14, 2022 CVE Published
- Feb 8, 2022 EPSS Score (30 in total, the first dated here)
- Mar 9, 2026 Security Advisory
- Jul 7, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-21680
vulnetix vdb fixes CVE-2022-21680
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-21680/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- FEDORA-2022-784d729f30 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-21680 advisory