{"id":"CVE-2022-21681","published":"2022-01-14T00:00:00Z","modified":"2025-04-22T18:33:29Z","title":"Exponential 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 `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.","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.02137,"percentile":0.82672,"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-5v2h-r2cx-5xgj","tags":[]},{"url":"https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/","tags":["vendor-advisory"]}],"priority":{"score":21.8,"factors":[{"name":"EPSS percentile","points":16.53},{"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:21.459933Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"marked","vulnerableRanges":["<4.0.10"],"patched":["4.0.10"],"from":["GHSA-5v2h-r2cx-5xgj"],"provenance":"source"}],"summary":{"text":"The marked markdown parser and compiler, by markedjs, contains an exponential catastrophic backtracking flaw (ReDoS) in its inline.reflinkSearch regular expression, affecting versions before 4.0.10. An attacker who can supply markdown that is processed by a vulnerable version over the network, with no authentication or user interaction required, can cause a denial of service, and the impact is exposed only where untrusted input is parsed without a worker thread or time limit.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:44:01Z"},"euvd":{"id":"EUVD-2022-0473","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-markedjs-marked-cve-2021-21306","parents":[{"from":"CVE-2021-21306","to":"CVE-2022-21681","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.54,"basis":"same product + CWE + description similarity"}]}]}}