Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

kangax/html-minifier
gh-pages @ 0d445f0
2
Fixes
1
CVEs
HIGH
Peak severity
Highlights
Cross-Site Scripting (XSS): 1 prior fix. Scrutinize any change in this area.
src/htmlminifier.js: most-fixed (1 issue). Treat as high-risk during review.
0 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.

Prototype Pollution: Using un-prefixed dynamic token strings as object keys in the TokenChain sorter allows modification of the Object prototype, potentially leading to arbitrary code execution or application crashes. This was mitigated by prepending a special character to dynamically generated keys.
Cross-Site Scripting (XSS): Unquoted attribute values containing custom server-side script fragments can be collapsed during minification. This permits attackers to escape the attribute context and inject malicious scripts. Retaining quotes around such attributes mitigates the issue.
Regular Expression Denial of Service (ReDoS): A poorly optimized regular expression matching the candidate variable during minification allows remote attackers to cause severe CPU exhaustion and Denial of Service (DoS) via specially crafted input strings.