CVE-2022-21681Exponential catastrophic backtracking (ReDoS) in marked
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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-marked | Fix pending | UBUNTU-CVE-2022-21681 | |
| Ubuntu 26.04 | node-marked | Under investigation | UBUNTU-CVE-2022-21681 | |
| Ubuntu 25.10 | node-marked | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21681 | |
| Ubuntu 24.04 | node-marked | Under investigation | UBUNTU-CVE-2022-21681 | |
| Ubuntu 22.04 | node-marked | Under investigation | UBUNTU-CVE-2022-21681 | |
| Ubuntu 20.04 | node-marked | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21681 | |
| Ubuntu 18.04 | node-marked | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21681 | |
| Ubuntu 16.04 | node-marked | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21681 | |
| Ubuntu 14.04 | node-marked | Will not fix Ubuntu decided not to fix this in this release | ||
| Debian 14 | node-marked | Fixed | 4.0.12+ds+~4.0.1-1 | DEBIAN-CVE-2022-21681 |
| Debian 13 | node-marked | Fixed | 4.0.12+ds+~4.0.1-1 | DEBIAN-CVE-2022-21681 |
| Debian 12 | node-marked | Fixed | 4.0.12+ds+~4.0.1-1 | DEBIAN-CVE-2022-21681 |
| Red Hat Enterprise Linux 9 | grafana | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 9 | librados-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | librados2 | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | libradospp-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | librbd-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | librbd1 | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | 389-ds-base | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-legacy-tools | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-libs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | cockpit | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-389-ds | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | cockpit-bridge | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-dashboard | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-machines | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-packagekit | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-pcp | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-podman | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-storaged | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-system | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-ws | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-lib389 | Will not fix Will not fix | ||
| npm library | marked | Fixed | 4.0.10 | GHSA-5v2h-r2cx-5xgj |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- markedjs marked: affected: < 4.0.10
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj
- https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.