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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.89%, higher than 87% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-14T00:00:00.000Z
- Modified: 2026-09-10T03:49:10.576Z
- Also known as: GHSA-5v2h-r2cx-5xgj
- Weaknesses: CWE-400, CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- markedjs marked: < 4.0.10
- marked (npm): before 4.0.10
- marked_project marked: before 4.0.10
- fedoraproject fedora: 36

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj> (exploit, third-party-advisory, web)
- <https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5> (patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21681> (advisory)
- <https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0> (web)
- <https://github.com/markedjs/marked> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX> (web)

## Sources

- CVE List: [CVE-2022-21681](https://www.cve.org/CVERecord?id=CVE-2022-21681), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-5v2h-r2cx-5xgj](https://github.com/advisories/GHSA-5v2h-r2cx-5xgj), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2022-21681](https://nvd.nist.gov/vuln/detail/CVE-2022-21681), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21681 · Whole record: https://cve.day/CVE-2022-21681.json · Rebuilt by cve.day 2026-11-25T22:58:09.248Z
