{"schemaVersion":3,"id":"CVE-2022-21681","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"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2022-01-14T00:00:00.000Z","modified":"2025-04-22T18:33:29.916Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.02766,"percentile":0.86103,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.023000000000000104,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.02743},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02766,"percentile":0.86103}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02743,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02766,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02766,"percentile":0.86103}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_MARKEDJS_MARKED","name":"Marked","source":"github","url":"https://github.com/markedjs/marked/security/advisories/GHSA-rrrm-qjm4-v8hf","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption","description":"The product does not properly control the allocation and maintenance of a limited resource.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/400.html"},{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity","description":"The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/1333.html"}],"affected":[{"vendor":"chainguard","product":"arangodb-3.11","name":"arangodb-3.11","label":"arangodb-3.11","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/arangodb-3.11","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"arangodb-3.12","name":"arangodb-3.12","label":"arangodb-3.12","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/arangodb-3.12","purlType":"apk","versions":[{"text":"< 3.12.9.4-r14","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.12.9.4-r14","eol":null,"hubHref":null},{"vendor":"debian","product":"node-marked","name":"node-marked","label":"node-marked","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/node-marked","purlType":"deb","versions":[{"text":"< 4.0.12+ds+~4.0.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.0.12+ds+~4.0.1-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"node-marked","name":"node-marked","label":"node-marked","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/node-marked","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"36","noFixRecorded":false,"fixedIn":null}],"versionsText":"36","eol":{"isEol":true,"eolDate":"2023-05-16T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"36","label":"36","eolFrom":"2023-05-16T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"marked_project","product":"marked","name":"marked","label":"marked","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 4.0.10","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.0.10","eol":null,"hubHref":"/vendor/marked_project/marked"},{"vendor":"markedjs","product":"marked","name":"marked","label":"marked","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 4.0.10","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.0.10","eol":null,"hubHref":"/vendor/markedjs/marked"},{"vendor":"Npm","product":"marked","name":"marked","label":"marked","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/marked","purlType":"npm","versions":[{"text":"< 4.0.10","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.0.10","eol":null,"hubHref":null}],"affectedCount":8,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj","label":"github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj","hostname":"github.com","tags":["REPORT","WEB","Advisory","Exploit","Third Party Advisory"]},{"url":"https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5","label":"github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5","hostname":"github.com","tags":["WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-21681","label":"ubuntu.com/security/CVE-2022-21681","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-21681","label":"www.cve.org/CVERecord?id=CVE-2022-21681","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-21681","label":"security-tracker.debian.org/tracker/CVE-2022-21681","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21681","label":"nvd.nist.gov/vuln/detail/CVE-2022-21681","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0","label":"github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/markedjs/marked","label":"github.com/markedjs/marked","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["WEB"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21681.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21681.json","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-GGPH-Q53H-VPJ7"]},"timeline":[{"kind":"published","date":"2022-01-14T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-22T18:33:29.916Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":41,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T21:31:41.256Z","stale":false,"partial":false}}