Service interruption via reference-definition backtracking
Published Jan 14, 2022 · Updated Apr 22, 2025
ReDoS in Marked before 4.0.10 allows remote attackers to interrupt services by submitting crafted Markdown reference definitions. The block.def expression in src/rules.js applies nested, ambiguous whitespace repetitions while parsing a reference definition, causing catastrophic backtracking on long spaces around a title. Exposure requires untrusted Markdown to reach Marked without a worker time limit; exploitation consumes CPU and interrupts the hosting process or service.
Summary
What happened
ReDoS in Marked before 4.0.10 allows remote attackers to interrupt services by submitting crafted Markdown reference definitions. The block.def expression in src/rules.js applies nested, ambiguous whitespace repetitions while parsing a reference definition, causing catastrophic backtracking on long spaces around a title. Exposure requires untrusted Markdown to reach Marked without a worker time limit; exploitation consumes CPU and interrupts the hosting process or service.
The record
- CVE
- CVE-2022-21680
- Published
- Jan 14, 2022
- Updated
- Apr 22, 2025
- Vendor
- MarkedJS
- Product
- Marked
- Classifications
- CWE-1333, CWE-400, T1499.004
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jan 14, 2022CVE publishedPublication date reported by the CVE source.
- Apr 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 4.0.10
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Upstream block.def ReDoS proof of conceptproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo