cJSON Library Integer Overflow Flaw Disclosed
A heap buffer overflow in the cJSON library's print_string_ptr() function on 32-bit platforms could enable RCE, info disclosure, or DoS.
CERT Polska coordinated disclosure of CVE-2026-16554, an integer overflow vulnerability in the widely-used DaveGamble cJSON library. The flaw resides in the print_string_ptr() function, where a 32-bit size_t counter tracking escape characters can wrap around when processing strings containing roughly 858,993,460 or more control characters. This causes the output buffer to be allocated based on an underestimated length, and when cJSON_PrintBuffered() is used with a pre-allocated buffer, the subsequent write loop overflows the heap allocation.
An attacker able to supply a crafted JSON string to an application using cJSON on a 32-bit platform could trigger a heap buffer overflow, potentially leading to remote code execution, information disclosure, or denial of service. The vulnerability has only been confirmed in version 1.7.19, though other versions may be affected as well. Notably, vendor contact attempts by CERT Polska were unsuccessful, meaning no official patch has been coordinated or confirmed at time of disclosure, leaving affected 32-bit deployments potentially exposed.
The vulnerability was reported by Michał Majchrowicz and Marcin Wyczechowski of AFINE Team through CERT Polska's coordinated vulnerability disclosure process. No active exploitation has been reported; this is a proactive disclosure of a library-level flaw requiring specific conditions (32-bit platform, large control-character input, use of cJSON_PrintBuffered) to trigger.
Mentioned in this report
Source reporting: https://cert.pl/en/posts/2026/07/CVE-2026-16554
This is the public brief
Subscribers see the full picture: extracted IOCs, ready-to-deploy detections (Sigma, Splunk, KQL, Elastic, YARA, Suricata), the entity graph, TAXII 2.1 feed and real-time alerts matched to your sectors.
Start free