CVE-2026-67215
HighCVSS 7.5Exploitation Probability (EPSS)
Low risk27th percentile - higher than 27% of all known CVEs
Summary
cJSON through 1.7.19 is vulnerable to uncontrolled recursion leading to stack exhaustion when applying untrusted RFC 6902 JSON Patch via cJSONUtils_ApplyPatches. An attacker can supply a patch with add and copy operations that amplify document depth, causing a stack overflow and process crash.
Risk Assessment
DoS attack can crash applications using cJSON, leading to service disruption and potential data loss.
Recommendation
Upgrade cJSON to a version beyond 1.7.19 or implement recursion depth limits.
Other vulnerabilities in cJSON
See all- CVE-2026-29036High
cJSON versions 1.5.0 through 1.7.19 contain an incorrectly-resolved name or reference vulnerability in the decode_pointer_inplace() function within cJSON_Utils.c that allows unauthenticated attackers to cause JSON Patch operations to target wrong object keys by supplying crafted JSON Pointer escape sequences (~0 or ~1) in patch paths. Attackers can submit malicious RFC 6902 JSON Patch input to applications using cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive() to silently corrupt data or delete unintended keys, potentially bypassing authorization controls in applications that rely on JSON Patch for access-controlled data modification.
- CVE-2026-67217Medium
A vulnerability in the cJSON library (up to version 1.7.19) causes JSON Patch operations (RFC 6902) to be non-atomic – on validation failure, the target element is removed before full validation, allowing an attacker to modify the document despite an error being reported.
- CVE-2026-67216Medium
A vulnerability in the cJSON library (up to version 1.7.19) causes inefficient algorithmic complexity in cJSON_Compare(), which performs an exponential number of operations when comparing deeply nested objects, potentially leading to denial of service (DoS).
- CVE-2026-16554High
cJSON library is vulnerable to an integer overflow in the print_string_ptr() function in cJSON.c on 32-bit platforms. The escape_characters counter, a 32-bit size_t, can wrap around when processing strings containing approximately 858,993,460 or more control characters, causing the output buffer to be allocated based on an underestimated length. When cJSON_PrintBuffered() is used with a pre-allocated buffer, the subsequent write loop overflows the heap allocation. An attacker supplying a crafted JSON string to an application using cJSON on a 32-bit platform can cause a heap buffer overflow, potentially leading to remote code execution, information disclosure, or denial of service. Because project creator contact attempts were unsuccessful, the vulnerability has only been confirmed in version 1.7.19 but may also affect other versions.
Original NVD description (English source)
cJSON through 1.7.19 is vulnerable to uncontrolled recursion leading to stack exhaustion when an untrusted RFC 6902 JSON Patch is applied via cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive(). A patch containing add and copy operations grafts duplicated subtrees to amplify document depth beyond the parser's nesting limit: cJSON_Delete() recurses with no depth bound, and the cJSON_Duplicate() guard CJSON_CIRCULAR_LIMIT is set to 10000, ten times the parser's 1000-level nesting limit and high enough to overflow a default thread stack. An attacker who can supply the patch document can crash the process, resulting in denial of service.

