CVE-2026-16554
published medium CVSS 4.0 · 5.1Integer Overflow Leading to Heap Buffer Overflow in cJSON
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| DaveGamble | — | cJSON1.7.19 · Other versions: unaffected | Affected | Not stated | CERT-PL |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.1 / 10
- Severity
- medium
- Provider
- CERT-PL · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| DaveGamble | cJSON | 1.7.19 (affected · semver)Default: unaffected | CERT-PL · cna |
Weaknesses
1- CWE-190 CWE-190 Integer overflow or wraparound
References
4Provider assertions
3CERT-PL · cna
Integer Overflow Leading to Heap Buffer Overflow in cJSON
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- acba0a638112809d1903f477ad2bbbffd7d3ab5ccb5c139ee026b7adbd580ecc
- Ingested
- 23 Sep 2026, 09:02:47 UTC
- Source record
- Official CVE record