Security context

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

DaveGamble/cJSON
master @ fb16e5c
12
Fixes
0
CVEs
HIGH
Peak severity
80.0%
Coverage
Highlights
Buffer Overflow: 7 prior fixes. Scrutinize any change in this area.
cJSON.c: most-fixed (9 issues). Treat as high-risk during review.
10 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.

Buffer Overflow: Dominant vulnerability class with multiple distinct sink patterns: fixed-size number buffer, strcpy overlap, minify writes, offset indexing, print_object allocation, and sprintf on large doubles. All stem from inadequate size/length validation on attacker-controlled data.
Out-of-bounds Read: Two parser-side reads past the input buffer: one in parse_string loop and one when handling trailing backslash. Both miss length checks before dereferencing pointers.
Out-of-bounds Write: cJSON_ApplyPatches allows attacker-controlled array index to reach cJSON_InsertItemInArray without validation, enabling out-of-bounds writes.