CVE-2026-16554
Integer Overflow Leading to Heap Buffer Overflow in cJSON
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.
INFO
Published Date :
July 27, 2026, 9:16 a.m.
Last Modified :
July 27, 2026, 9:16 a.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 4.0 | MEDIUM | 4bb8329e-dd38-46c1-aafb-9bf32bcb93c6 | ||||
| CVSS 4.0 | MEDIUM | [email protected] |
Solution
- Update the cJSON library to a patched version.
- Avoid processing untrusted JSON input on 32-bit systems.
- Review input validation for JSON processing.
- Consider using a 64-bit platform.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-16554.
| URL | Resource |
|---|---|
| https://cert.pl/en/posts/2026/07/CVE-2026-16554 | |
| https://github.com/DaveGamble/cJSON |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-16554 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-16554
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-16554 vulnerability anywhere in the article.
-
cert.pl
Vulnerability in DaveGamble cJSON library
Vulnerability in DaveGamble cJSON library CVE ID CVE-2026-16554 Publication date 27 July 2026 Vendor DaveGamble Product cJSON Vulnerable versions 1.7.19 Vulnerability type (CWE) Integer overflow or wr ... Read more
The following table lists the changes that have been made to the
CVE-2026-16554 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by [email protected]
Jul. 27, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://github.com/DaveGamble/cJSON', 'vendor': 'DaveGamble', 'modules': ['cJSON.c'], 'product': 'cJSON', 'versions': [{'status': 'affected', 'version': '1.7.19', 'versionType': 'semver'}], 'defaultStatus': 'unaffected'}] Added 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. Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-190 Added Reference https://cert.pl/en/posts/2026/07/CVE-2026-16554 Added Reference https://github.com/DaveGamble/cJSON