CVE-2022-21681

Exponential catastrophic backtracking (ReDoS) in marked

Published Jan 14, 2022 CVSS 3.1 · 7.5 High EPSS 2.9% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-0473 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.
Github GHSA Github GHSA GHSA-5v2h-r2cx-5xgj Inefficient Regular Expression Complexity in marked
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 22, 2025, 6:33 PM
Reserved
Nov 16, 2021, 12:00 AM
Status
Modified
Published
Jan 14, 2022, 5:15 PM
Modified
Jun 17, 2026, 4:26 AM
Severity
Moderate
Public date
Jan 14, 2022, 12:00 AM