CVE-2026-67217
MediumCVSS 5.3Exploitation Probability (EPSS)
Low risk14th percentile - higher than 14% of all known CVEs
Summary
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.
Risk Assessment
The organization may experience unexpected changes in JSON data, potentially leading to data corruption or integrity issues.
Recommendation
Update the cJSON library to version 1.7.20 or later if available.
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-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-67215High
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.
- 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 applies RFC 6902 JSON Patch operations non-atomically in apply_patch() in cJSON_Utils.c. For a replace operation that is missing its value member, or a move operation whose destination path cannot be resolved, the existing target member is detached and deleted before the operation is fully validated, so the target document is mutated while cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive() returns a failure status. An attacker who can supply the patch document can destroy addressable members of the target document even though the API reports that the patch failed, defeating the all-or-nothing behavior callers rely on to reject bad patches.

