Security context

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

kriszyp/json-schema
master @ 5a2ec23
5
Fixes
1
CVEs
CRITICAL
Peak severity
Highlights
Prototype Pollution: 4 prior fixes. Scrutinize any change in this area.
lib/validate.js: most-fixed (5 issues). Treat as high-risk during review.
3 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: Attackers can bypass validation or pollute object prototypes by injecting special properties like '__proto__' or 'constructor' during the validation and default application processes. This risk is highly critical as demonstrated by CVE-2021-3918.
Prototype Pollution: Modifying or adding attributes to global primitive constructors (such as String, Boolean, Number, Object, Array, Date) creates shared state corruption and potential prototype pollution across the entire runtime environment.
Denial of Service: Using unsafe instance property lookups such as 'instance.hasOwnProperty' directly on user-controlled input can trigger TypeErrors (e.g., when the input has a null prototype or overrides hasOwnProperty), leading to application-wide denial of service.