Integer Overflow in cJSON Can Trigger Heap Overflow and Possible RCE
Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Jul 27, 2026

CERT Polska disclosed CVE-2026-16554, an integer overflow vulnerability in the DaveGamble cJSON library that can lead to a heap buffer overflow on 32-bit platforms. The flaw affects confirmed version 1.7.19 and occurs in the print_string_ptr() function in cJSON.c, where the 32-bit size_t escape_characters counter can wrap while processing extremely large JSON strings containing roughly 858,993,460 or more control characters.
If an application uses cJSON_PrintBuffered() with a pre-allocated buffer, the integer wrap can cause the library to underestimate the required allocation before entering the write loop, creating conditions for memory corruption. CERT Polska said a crafted JSON string supplied to software using cJSON could enable remote code execution, information disclosure, or denial of service; the group coordinated disclosure but said vendor contact attempts were unsuccessful, and only version 1.7.19 has been confirmed vulnerable so far, though other versions may also be affected.
Why it matters
Impact assessment
CVE-2026-16554 affects software that embeds the DaveGamble cJSON library on 32-bit platforms, with confirmed exposure in cJSON 1.7.19 and possible exposure in other versions. The impact can be severe for internet-facing or untrusted-input parsing workflows because successful exploitation may cause remote code execution, information disclosure, or denial of service through heap corruption.
The exposure is likely broad at the supply-chain level because cJSON is a reusable library, but practical exploitation is constrained by specific conditions: 32-bit builds, very large attacker-controlled JSON strings, and use of cJSON_PrintBuffered() with a pre-allocated buffer. No in-the-wild exploitation was reported in the provided references.
Affected populations
- Vendors and developers shipping applications that statically or dynamically include cJSON
- Organizations running 32-bit applications or embedded systems that process untrusted JSON
- Products that call
cJSON_PrintBuffered()on attacker-influenced content
Severity and business risk
- Potential outcomes: remote code execution, information disclosure, denial of service
- Likely operational impact: application crashes, service instability, possible compromise of affected processes
- Potential business impact: outage, incident response costs, reputational damage if exposed services are exploitable
Scope and exploitation status
- Confirmed affected version: cJSON 1.7.19
- Other versions may also be affected but were not confirmed in the references
- No known exploitation in the wild stated in the source material


