CVE-2022-21681
HIGH 7.5CVSS 3.1Inefficient Regular Expression Complexity 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.
- Published
- 14 Jan 2022
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-1333CWE-400
- Also known as
- GHSA-5v2h-r2cx-5xgj
- Sources
- NVDJSONOSV GHSA-5v2h-r2cx-5xgjJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | marked_project | markedcpe:2.3:a:marked_project:marked:*:*:*:*:*:node.js:*:* |
< 4.0.10 | 4.0.10 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* |
= 36 | |
| OSV | npm | marked | < 4.0.10 | 4.0.10 |
References
- https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5 · Patch, Third Party Advisory, WEB
- https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj · Exploit, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX/
- https://nvd.nist.gov/vuln/detail/CVE-2022-21681 · ADVISORY
- https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0 · WEB
- https://github.com/markedjs/marked · PACKAGE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AIXDMC3CSHYW3YWVSQOXAWLUYQHAO5UX · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 14 Jan 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 14 Jan 2022)