CVE-2026-16554

Description

A flaw was found in the cJSON library. On 32-bit platforms, a specially crafted JSON string can cause an integer overflow in the print_string_ptr() function. This vulnerability can lead to a heap buffer overflow, which an attacker could exploit to achieve remote code execution, disclose sensitive information, or cause a denial of service.

Statement

This flaw is an integer overflow in the print_string_ptr() function of the cJSON library. A 32-bit size_t counter used to track escape characters can wrap around when a JSON string contains approximately 858,993,460 or more control characters, causing an undersized heap buffer to be allocated and subsequently overflowed when the JSON is printed.

This issue does not affect the versions of cJSON, or of components that vendor/bundle it (such as rpm-ostree), as shipped with Red Hat Enterprise Linux, Red Hat Satellite, or OpenShift Container Platform. None of these products build or run cJSON, or components embedding it, as 32-bit (i686) binaries: Red Hat Enterprise Linux 7 and later do not support direct installation on or execution as a 32-bit x86 process, the RHEL 8/9 multilib compatibility layer does not include general application libraries such as cJSON, and RHEL 10 removed multilib support entirely. Since the underlying size_t overflow this flaw depends on only manifests on a 32-bit build, the vulnerable condition is not reachable on any architecture these products ship or run on.

Additionally, the CVE Numbering Authority (CERT.PL) was unable to reach the cJSON project maintainer during disclosure, and this issue has only been confirmed in cJSON version 1.7.19; no official upstream fix is currently available.

Mitigation

No mitigation is required for Red Hat Enterprise Linux, Red Hat Satellite, or OpenShift Container Platform, as these products are not affected due to their exclusively 64-bit architecture support.

No upstream fix is currently available for other affected configurations (for example, cJSON as built for 32-bit architectures in Fedora). As a general precaution, applications using cJSON on a 32-bit platform should avoid processing untrusted JSON input containing very large numbers of control characters within a single string value.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.8N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeChangedN/AN/A
ConfidentialityLowN/AN/A
Integrity ImpactLowN/AN/A
Availability ImpactLowN/AN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

Understanding the Weakness (CWE)

Integrity,Availability,Confidentiality

Technical Impact: DoS: Crash, Exit, or Restart; Execute Unauthorized Code or Commands; Read Memory; Modify Memory

If the incorrect calculation is used in the context of memory allocation, then the software may create a buffer that is smaller or larger than expected. If the allocated buffer is smaller than expected, this could lead to an out-of-bounds read or write (CWE-119), possibly causing a crash, allowing arbitrary code execution, or exposing sensitive data.

Frequently Asked Questions

Want to get errata notifications? Sign up here.