Highlights
Denial of Service: 30 prior fixes. Scrutinize any change in this area.
lib/marked.js: most-fixed (50 issues). Treat as high-risk during review.
58 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Regular Expression Denial of Service (ReDoS): Catastrophic backtracking in nested delimiters and link label tokenizers allows unauthenticated attackers to cause CPU exhaustion and crash the application. Restructuring regular expressions to prevent overlapping matching groups is vital.
Cross-Site Scripting (XSS): Incomplete sanitization and logical bypasses in HTML entity unescaping let attackers smuggle 'javascript:', 'vbscript:', and 'data:' protocols into link hrefs and image sources. Active unescaping prior to protocol checks is required.
Denial of Service: The parsing loops inside the Lexer can fall into infinite loops when encountering unexpected sequence combinations (e.g. blank lines and nested block structures), resulting in infinite execution loops that lock up the Node.js event loop.