CVE-2026-16554
Received Received - Intake

Integer Overflow Leading to Heap Buffer Overflow in cJSON Library

Vulnerability report for CVE-2026-16554, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-27

Last updated on: 2026-07-27

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-27
Last Modified
2026-07-27
Generated
2026-07-27
AI Q&A
2026-07-27
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-16554 is an integer overflow vulnerability in the cJSON library's print_string_ptr() function on 32-bit platforms. When processing strings with around 858,993,460 or more control characters, a 32-bit counter wraps around, causing the output buffer to be allocated too small. This leads to a heap buffer overflow when using cJSON_PrintBuffered() with a pre-allocated buffer.

Detection Guidance

Detecting this vulnerability requires checking if your system uses cJSON version 1.7.19 or potentially other versions on 32-bit platforms. Inspect installed cJSON versions in your applications or libraries. Monitor for crashes or memory corruption when processing large JSON strings with control characters.

Impact Analysis

An attacker could exploit this by providing a specially crafted JSON string to an application using cJSON on a 32-bit system. This may result in remote code execution, information disclosure, or denial of service, depending on the application's context and security measures.

Mitigation Strategies

Immediately upgrade to the latest version of cJSON if available. If upgrading is not possible, avoid using cJSON_PrintBuffered() with pre-allocated buffers on 32-bit systems. Validate and sanitize all JSON input to limit control characters. Consider using alternative JSON parsers until a patch is available.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-16554. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart