{"id":"CVE-2022-21680","published":"2022-01-14T00:00:00Z","modified":"2025-04-22T18:33:37Z","title":"Cubic catastrophic backtracking (ReDoS) in marked","vendor":"markedjs","product":"marked","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02983,"percentile":0.87616,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/markedjs/marked/security/advisories/GHSA-rrrm-qjm4-v8hf","tags":[]},{"url":"https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0","tags":[]},{"url":"https://github.com/markedjs/marked/releases/tag/v4.0.10","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/","tags":["vendor-advisory"]}],"priority":{"score":22.8,"factors":[{"name":"EPSS percentile","points":17.52},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"markedjs","affectedVersions":[{"vendor":"markedjs","product":"marked","versions":["< 4.0.10"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-22T15:42:24.798116Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"marked","vulnerableRanges":["<4.0.10"],"patched":["4.0.10"],"from":["GHSA-rrrm-qjm4-v8hf"],"provenance":"source"}],"summary":{"text":"The flaw is a catastrophic backtracking condition in the block.def regular expression of the marked markdown parser and compiler, in versions prior to 4.0.10. An attacker who can supply markdown that a vulnerable marked instance processes, without any authentication, user interaction, or special configuration, can cause a regular expression denial of service that exhausts resources, particularly where no worker with a time limit is in place.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:42:05Z"},"euvd":{"id":"EUVD-2022-0691","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-markedjs-marked-cve-2021-21306","parents":[{"from":"CVE-2021-21306","to":"CVE-2022-21680","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/rules.js"],"commits":["https://github.com/markedjs/marked/commit/7293251c438e3ee968970f7609f1a27f9007bccd","https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.57,"basis":"same product + CWE + description similarity"}]}]}}