Highlights
Code Injection: 5 prior fixes. Scrutinize any change in this area.
lib/compile/codegen.ts: most-fixed (4 issues). Treat as high-risk during review.
8 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.
Code Injection: The code generator historically compiled dynamic validators from raw strings, leading to critical risk of remote code execution during schema compilation. Mitigations require wrapping raw code into type-safe Name/Code classes and using tagged template literals.
Prototype Pollution: User-controlled format names can lead to prototype pollution or lookup bypasses in the formats registry. This is also highlighted by CVE-2020-15366, where crafted schemas bypass validation logic.
ReDoS: Processing untrusted schemas with complex regular expressions can cause Denial of Service (ReDoS) if the configured safe regular expression engine (e.g., RE2) is bypassed or unutilized.