# CVE-2026-16554: Integer Overflow Leading to Heap Buffer Overflow in cJSON

- Severity: Medium 5.1 (CVSS:4.0, scored by CERT-PL) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:L/SI:L/SA:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 23% of CVEs (2026-12-01)
- Published: 2026-07-27T08:40:17.183Z
- Modified: 2026-10-24T13:10:00.147Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CERT-PL

## 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.

(As written by CVE List.)

## Affected

- DaveGamble cJSON: 1.7.19

## Every score

- CERT-PL: CVSS:4.0 5.1 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:L/SI:L/SA:L`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://cert.pl/en/posts/2026/07/CVE-2026-16554> (third-party-advisory)
- <https://github.com/DaveGamble/cJSON> (product)
- <http://www.openwall.com/lists/oss-security/2026/07/30/26> (issue-tracking, mailing-list, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2026/07/31/4> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2026-16554](https://www.cve.org/CVERecord?id=CVE-2026-16554), CVE Terms of Use, modified 2026-07-31
- NVD: [CVE-2026-16554](https://nvd.nist.gov/vuln/detail/CVE-2026-16554), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-16554 · Whole record: https://cve.day/CVE-2026-16554.json · Rebuilt by cve.day 2026-11-25T22:59:30.176Z
