# CVE-2022-21681: Exponential catastrophic backtracking (ReDoS) in marked

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-01-14 · Modified: 2025-04-22
- Aliases: UBUNTU-CVE-2022-21681, DEBIAN-CVE-2022-21681, GHSA-5v2h-r2cx-5xgj, CGA-4gvg-r95r-vgcf, CGA-58jc-jf4c-c3fw, CGA-6qgj-77j2-j7p9, CGA-7wc3-9r33-cwv3
- Record: https://cvemate.com/vulnerability/CVE-2022-21681 · JSON: https://cvemate.com/vulnerability/CVE-2022-21681/json

## Description

```text
Marked is a markdown parser and compiler. Prior to version 4.0.10, the regular expression `inline.reflinkSearch` may cause catastrophic backtracking against some strings and lead to a denial of service (DoS). 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.
```

## Signals

- CVSS: 7.5 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 2.893%, percentile 87.359%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- chainguard arangodb-3.11 (Chainguard): All versions (No fix recorded)
- chainguard arangodb-3.12 (Chainguard): \< 3.12.9.4-r14
- debian node-marked (Debian): \< 4.0.12+ds+~4.0.1-1
- ubuntu node-marked (Ubuntu): All versions (No fix recorded)
- fedoraproject fedora: 36
- marked\_project marked: \< 4.0.10
- markedjs marked: \< 4.0.10
- Npm marked (Npm): \< 4.0.10

## References

- <https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj>
- <https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/>
- <https://ubuntu.com/security/CVE-2022-21681>
- <https://www.cve.org/CVERecord?id=CVE-2022-21681>
- <https://security-tracker.debian.org/tracker/CVE-2022-21681>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21681>
- <https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0>
- <https://github.com/markedjs/marked>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21681.json>

---

Data as of 2026-12-05T09:54:33.442Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
