CVE-2026-16554: CWE-190 Integer overflow or wraparound in DaveGamble cJSON
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.
AI Analysis
Technical Summary
CVE-2026-16554 is an integer overflow vulnerability in the cJSON library's print_string_ptr() function on 32-bit platforms. The vulnerability arises because the escape_characters counter, a 32-bit size_t, can wrap around when processing strings containing approximately 858,993,460 or more control characters. This wraparound causes 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 can overflow the heap allocation. This heap buffer overflow can be triggered by an attacker supplying a crafted JSON string, potentially leading to remote code execution, information disclosure, or denial of service. The vulnerability has been confirmed in version 1.7.19, but other versions may also be affected. Attempts to contact the project creator were unsuccessful, and no patch or remediation guidance is currently available.
Potential Impact
Exploitation of this vulnerability can lead to heap buffer overflow on 32-bit platforms using cJSON version 1.7.19. This may result in remote code execution, information disclosure, or denial of service. The vulnerability requires an attacker to supply a specially crafted JSON string containing a very large number of control characters. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since attempts to contact the project creator were unsuccessful and no official fix is available, users should consider avoiding use of cJSON version 1.7.19 on 32-bit platforms or implement additional input validation to limit the size and content of JSON strings processed. Monitor vendor channels for any future patches or updates addressing this issue.
CVE-2026-16554: CWE-190 Integer overflow or wraparound in DaveGamble 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.
CVSS v4.0
Score 5.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-16554 is an integer overflow vulnerability in the cJSON library's print_string_ptr() function on 32-bit platforms. The vulnerability arises because the escape_characters counter, a 32-bit size_t, can wrap around when processing strings containing approximately 858,993,460 or more control characters. This wraparound causes 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 can overflow the heap allocation. This heap buffer overflow can be triggered by an attacker supplying a crafted JSON string, potentially leading to remote code execution, information disclosure, or denial of service. The vulnerability has been confirmed in version 1.7.19, but other versions may also be affected. Attempts to contact the project creator were unsuccessful, and no patch or remediation guidance is currently available.
Potential Impact
Exploitation of this vulnerability can lead to heap buffer overflow on 32-bit platforms using cJSON version 1.7.19. This may result in remote code execution, information disclosure, or denial of service. The vulnerability requires an attacker to supply a specially crafted JSON string containing a very large number of control characters. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since attempts to contact the project creator were unsuccessful and no official fix is available, users should consider avoiding use of cJSON version 1.7.19 on 32-bit platforms or implement additional input validation to limit the size and content of JSON strings processed. Monitor vendor channels for any future patches or updates addressing this issue.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CERT-PL
- Date Reserved
- 2026-07-22T11:49:39.961Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a671c679c2644c7f8bc2e17
Added to database: 07/27/2026, 08:52:55 UTC
Last enriched: 08/06/2026, 16:54:19 UTC
Last updated: 09/09/2026, 10:52:07 UTC
Views: 88
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.