# CVE-2026-16554: DaveGamble cJSON integer overflow in print_string_ptr

Source: https://junglewise.ai/threats/cve-2026-16554-davegamble-cjson-integer-overflow-in-print-string-ptr  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-27. Updated: 2026-07-27  
License: CC BY 4.0 with a link back

CVE-2026-16554 · Severity: info · CVSS 5.1 · Published 2026-07-27

cJSON is a lightweight software library used by developers to process JSON data. A vulnerability exists on 32-bit systems where processing extremely large, specially crafted data strings can cause the library to crash or potentially allow unauthorized code execution. This could lead to service outages or the exposure of sensitive information in applications that rely on this library.

Technologies: [DaveGamble cJSON](https://junglewise.ai/threats/technologies/cjson). Vendors: [DaveGamble](https://junglewise.ai/threats/vendors/davegamble).

## Quick answers

**Is CVE-2026-16554 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-16554 being exploited in the wild.

**How severe is CVE-2026-16554?** Informational severity, with a CVSS score of 5.1, published 27 July 2026.

**Which products and versions are affected?** DaveGamble cJSON 1.7.19.

**Is there a fix for CVE-2026-16554?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-16554 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-16554?** Check whether you run DaveGamble cJSON at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An integer overflow vulnerability (CWE-190) exists in the print_string_ptr() function within 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. This causes the output buffer to be allocated with an underestimated length. When cJSON_PrintBuffered() is subsequently used with a pre-allocated buffer, the write loop overflows the heap allocation. An attacker can exploit this by supplying a crafted JSON string to trigger a heap buffer overflow, potentially resulting in remote code execution (RCE), information disclosure, or denial of service (DoS). As of the advisory date, the vendor has not been successfully contacted, and a patch is not confirmed.

## Affected products

- DaveGamble cJSON 1.7.19

## Timeline

- 2026-07-27: advisory: Advisory published by CERT.PL
- 2026-07-27: disclosed

## References

- [https://cert.pl/en/posts/2026/07/CVE-2026-16554](https://cert.pl/en/posts/2026/07/CVE-2026-16554)
- [https://github.com/DaveGamble/cJSON](https://github.com/DaveGamble/cJSON)

## Related threats

- [cJSON use-after-free in MergePatch](https://junglewise.ai/threats/cve-2026-87933-cjson-use-after-free-in-mergepatch)
- [cJSON JSON Pointer escape sequence bypass in decode_pointer_inplace()](https://junglewise.ai/threats/cve-2026-29036-cjson-json-pointer-escape-sequence-bypass-in-decode-pointer)
- [DaveGamble cJSON non-atomic JSON Patch application in cJSON_Utils.c](https://junglewise.ai/threats/cve-2026-67217-davegamble-cjson-non-atomic-json-patch-application-in-cjson-utils)
- [DaveGamble cJSON denial of service in cJSON_Compare](https://junglewise.ai/threats/cve-2026-67216-davegamble-cjson-denial-of-service-in-cjson-compare)
- [DaveGamble cJSON uncontrolled recursion in cJSONUtils_ApplyPatches](https://junglewise.ai/threats/cve-2026-67215-davegamble-cjson-uncontrolled-recursion-in-cjsonutils)
