{"id":"UBUNTU-CVE-2022-21680","details":"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.","modified":"2026-05-20T16:07:43.249716741Z","published":"2022-01-14T17:15:00Z","upstream":["CVE-2022-21680"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-21680"},{"type":"REPORT","url":"https://github.com/markedjs/marked/security/advisories/GHSA-rrrm-qjm4-v8hf"},{"type":"REPORT","url":"https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0"},{"type":"REPORT","url":"https://github.com/markedjs/marked/releases/tag/v4.0.10"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-21680"}],"affected":[{"package":{"name":"node-marked","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.2+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"0.3.2+dfsg-1"},{"binary_name":"node-marked","binary_version":"0.3.2+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.6+dfsg-1","0.3.9+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"0.3.9+dfsg-1"},{"binary_name":"node-marked","binary_version":"0.3.9+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.1+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"0.5.1+dfsg-1"},{"binary_name":"node-marked","binary_version":"0.5.1+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.8.0+ds+repack-2","0.8.0+ds+repack-3","4.0.5+ds-5","4.0.9+ds+~4.0.1-2","4.0.12+ds+~4.0.1-1","4.0.12+ds+~4.0.1-2ubuntu1","4.0.12+ds+~4.0.1-2ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"4.0.12+ds+~4.0.1-2ubuntu2"},{"binary_name":"node-marked","binary_version":"4.0.12+ds+~4.0.1-2ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.2.3+ds+~4.0.7-2ubuntu1","4.2.3+ds+~4.0.7-3"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"4.2.3+ds+~4.0.7-3"},{"binary_name":"node-marked","binary_version":"4.2.3+ds+~4.0.7-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.2.3+ds+~4.0.7-3","4.2.3+ds+~4.0.7-4"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"4.2.3+ds+~4.0.7-4"},{"binary_name":"node-marked","binary_version":"4.2.3+ds+~4.0.7-4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.json"}},{"package":{"name":"node-marked","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/node-marked?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.2.3+ds+~4.0.7-4"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-marked","binary_version":"4.2.3+ds+~4.0.7-4"},{"binary_name":"node-marked","binary_version":"4.2.3+ds+~4.0.7-4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21680.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"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}