High severity · published Jul 27, 2026
CVE-2026-16554
Integer Overflow Leading to Heap Buffer Overflow in cJSON
7.8
CVSS
0.4%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 30% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CJ
cJSON · DaveGamble
1.7.19 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-16554
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-16554
Third Party Advisory
https://cert.pl/en/posts/2026/07/CVE-2026-16554
Product
https://github.com/DaveGamble/cJSON
Issue Tracking
http://www.openwall.com/lists/oss-security/2026/07/30/26
Mailing List
http://www.openwall.com/lists/oss-security/2026/07/31/4
More from cJSON
9.8
CVE-2025-57052
cJSON 1.5.0 through 1.7.18 allows out-of-bounds access via the decode_array_index_from_pointer function in cJSON_Utils.c, allowing remote attackers to bypass array bounds checking…
9.8
CVE-2019-11835
cJSON before 1.7.11 allows out-of-bounds access, related to multiline comments
9.8
CVE-2019-11834
cJSON before 1.7.11 allows out-of-bounds access, related to \x00 in a string literal
9.8
CVE-2016-10749
parse_string in cJSON.c in cJSON before 2016-10-02 has a buffer over-read, as demonstrated by a string that begins with a " character and ends with a \ character
9.8
CVE-2018-1000217
Dave Gamble cJSON version 1.7.3 and earlier contains a CWE-416: Use After Free vulnerability in cJSON library that can result in Possible crash, corruption of data or even RCE
