cJSON vulnerabilities
5 known CVE vulnerabilities in cJSON, translated and rated.
- 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-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.

