CVE-2026-16554Integer Overflow Leading to Heap Buffer Overflow in 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.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | cjson | Fix pending | UBUNTU-CVE-2026-16554 | |
| Ubuntu 26.04 | cjson | Under investigation | UBUNTU-CVE-2026-16554 | |
| Ubuntu 24.04 | cjson | Fix pending | UBUNTU-CVE-2026-16554 | |
| Ubuntu 22.04 | cjson | Fix pending | UBUNTU-CVE-2026-16554 | |
| Ubuntu 20.04 | cjson | Fix pending | UBUNTU-CVE-2026-16554 | |
| Debian 14 | cjson | Fix pending | DEBIAN-CVE-2026-16554 | |
| Debian 13 | cjson | Fix pending | DEBIAN-CVE-2026-16554 | |
| Debian 12 | cjson | Fix pending | DEBIAN-CVE-2026-16554 | |
| Red Hat Enterprise Linux 8 | rpm-ostree | Not affected | ||
| Red Hat Enterprise Linux 8 | rpm-ostree-libs | Not affected |
What the vendor says
As published in the CVE record by CERT-PL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- DaveGamble cJSON: affected: 1.7.19
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.