{"id":"CVE-2022-21681","summary":"Exponential catastrophic backtracking (ReDoS) in marked","details":"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.","aliases":["GHSA-5v2h-r2cx-5xgj"],"modified":"2026-04-10T04:44:02.057648Z","published":"2022-01-14T00:00:00Z","database_specific":{"cna_assigner":"GitHub_M","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21681.json","cwe_ids":["CWE-1333","CWE-400"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21681.json"},{"type":"ADVISORY","url":"https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21681"},{"type":"FIX","url":"https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/chjj/marked","events":[{"introduced":"0"},{"fixed":"ae01170085e89ccd85c233547011eb88420a90cf"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"4.0.10"}]}}],"versions":["0.3.14","0.3.15","0.3.9","0.4.0","v0.0.1","v0.0.2","v0.0.3","v0.0.4","v0.0.5","v0.0.6","v0.0.7","v0.0.8","v0.0.9","v0.1.0","v0.1.1","v0.1.2","v0.1.3","v0.1.4","v0.1.5","v0.1.6","v0.1.7","v0.1.8","v0.1.9","v0.2.0","v0.2.1","v0.2.10","v0.2.2","v0.2.3","v0.2.4","v0.2.5","v0.2.6","v0.2.7","v0.2.8","v0.2.9","v0.3.0","v0.3.1","v0.3.12","v0.3.17","v0.3.18","v0.3.19","v0.3.2","v0.3.3","v0.3.4","v0.3.5","v0.3.6","v0.3.7","v0.5.0","v0.5.1","v0.5.2","v0.6.0","v0.6.1","v0.6.2","v0.6.3","v0.7.0","v0.8.0","v0.8.1","v0.8.2","v1.0.0","v1.1.0","v1.1.1","v1.1.2","v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.2.5","v1.2.6","v1.2.7","v1.2.8","v1.2.9","v1.20","v2.0.0","v2.0.1","v2.0.2","v2.0.3","v2.0.4","v2.0.5","v2.0.6","v2.0.7","v2.1.0","v2.1.1","v2.1.2","v2.1.3","v3.0.0","v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.0.5","v3.0.6","v3.0.7","v3.0.8","v4.0.0","v4.0.1","v4.0.2","v4.0.3","v4.0.4","v4.0.5","v4.0.6","v4.0.7","v4.0.8","v4.0.9"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21681.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/markedjs/marked","events":[{"introduced":"0"},{"fixed":"ae01170085e89ccd85c233547011eb88420a90cf"}]}],"versions":["0.3.14","0.3.15","0.3.9","0.4.0","v0.0.1","v0.0.2","v0.0.3","v0.0.4","v0.0.5","v0.0.6","v0.0.7","v0.0.8","v0.0.9","v0.1.0","v0.1.1","v0.1.2","v0.1.3","v0.1.4","v0.1.5","v0.1.6","v0.1.7","v0.1.8","v0.1.9","v0.2.0","v0.2.1","v0.2.10","v0.2.2","v0.2.3","v0.2.4","v0.2.5","v0.2.6","v0.2.7","v0.2.8","v0.2.9","v0.3.0","v0.3.1","v0.3.12","v0.3.17","v0.3.18","v0.3.19","v0.3.2","v0.3.3","v0.3.4","v0.3.5","v0.3.6","v0.3.7","v0.5.0","v0.5.1","v0.5.2","v0.6.0","v0.6.1","v0.6.2","v0.6.3","v0.7.0","v0.8.0","v0.8.1","v0.8.2","v1.0.0","v1.1.0","v1.1.1","v1.1.2","v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.2.5","v1.2.6","v1.2.7","v1.2.8","v1.2.9","v1.20","v2.0.0","v2.0.1","v2.0.2","v2.0.3","v2.0.4","v2.0.5","v2.0.6","v2.0.7","v2.1.0","v2.1.1","v2.1.2","v2.1.3","v3.0.0","v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.0.5","v3.0.6","v3.0.7","v3.0.8","v4.0.0","v4.0.1","v4.0.2","v4.0.3","v4.0.4","v4.0.5","v4.0.6","v4.0.7","v4.0.8","v4.0.9"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21681.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}