CVE-2025-57052
NixOS vulnerability analysis and mitigation

Overview

CVE-2025-57052 is an out-of-bounds access vulnerability in the cJSON library affecting versions 1.5.0 through 1.7.18. The flaw resides in the decode_array_index_from_pointer function within cJSON_Utils.c, allowing remote attackers to bypass array bounds checking and access restricted memory via malformed JSON pointer strings containing alphanumeric characters. It was publicly disclosed on September 3, 2025, and carries a CVSS v3.1 base score of 9.8 (Critical) (Red Hat Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-125 (Out-of-bounds Read) and CWE-129 (Improper Validation of Array Index). The decode_array_index_from_pointer function in cJSON_Utils.c fails to properly validate array indices derived from JSON pointer strings, allowing an attacker to supply crafted alphanumeric characters in a JSON pointer that bypass bounds checks and cause the library to read (or potentially write) outside the intended memory region. Exploitation requires no authentication and no user interaction — an attacker need only supply a malformed JSON pointer string to an application that processes it using the vulnerable cJSON library. A technical write-up and proof-of-concept are publicly available (x-0r PoC).

Impact

Successful exploitation can result in unauthorized access to restricted memory, potential disclosure of sensitive data, memory corruption, and in the worst case, arbitrary code execution or application crashes. The vulnerability affects confidentiality, integrity, and availability at a high level, as an attacker could read out-of-bounds memory, corrupt data structures, or destabilize the host application. Given cJSON's widespread use as an embedded C JSON library across IoT devices, network appliances, and server-side applications, the blast radius is broad and may facilitate lateral movement in environments where the library processes untrusted network input (Red Hat Advisory, x-0r PoC).

Exploitation steps

  1. Reconnaissance: Identify applications or services that use the cJSON library (versions 1.5.0–1.7.18) and accept JSON pointer strings as input — common in IoT firmware, REST APIs, and embedded systems.
  2. Craft malicious JSON pointer: Construct a malformed JSON pointer string containing alphanumeric characters designed to produce an out-of-bounds array index when parsed by decode_array_index_from_pointer in cJSON_Utils.c.
  3. Submit payload: Send the crafted JSON pointer string to the target application via any network-accessible interface that passes the pointer to the vulnerable cJSON function (e.g., HTTP request body, MQTT message, or other protocol input).
  4. Trigger out-of-bounds access: The vulnerable function fails to validate the derived array index, causing the library to access memory outside the intended array boundaries.
  5. Achieve objective: Depending on memory layout and application context, the attacker may read sensitive data from adjacent memory, corrupt data structures, or trigger a crash — potentially escalating to code execution in favorable conditions (x-0r PoC).

Indicators of compromise

  • Network: Unusual or malformed JSON pointer strings (e.g., containing unexpected alphanumeric sequences in array index positions) in HTTP request bodies or other protocol payloads directed at services using cJSON.
  • Logs: Application crash logs or segmentation fault reports originating from cJSON_Utils.c or the decode_array_index_from_pointer function; unexpected process restarts of services that use cJSON.
  • Process: Abnormal memory access violations or core dumps generated by applications linked against cJSON 1.5.0–1.7.18; unexpected child processes spawned by cJSON-consuming services.
  • File System: Presence of cJSON library versions 1.5.0–1.7.18 (libcjson.so, cJSON_Utils.c build artifacts) on systems that have not been patched.

Mitigation and workarounds

Upgrade the cJSON library to a version beyond 1.7.18 as the primary remediation. Red Hat has issued patches for affected products including Red Hat Satellite 6.15 (RHSA-2025:17614), 6.16 (RHSA-2025:17613), and 6.17 (RHSA-2025:17606). Debian, SUSE, Ubuntu, and openSUSE have also released updated packages for their respective distributions. As an interim workaround, implement strict input validation for JSON pointer strings at the application layer before passing them to cJSON, and consider restricting network access to systems running vulnerable versions until patching is complete (Red Hat Bugzilla, Red Hat Advisory).

Community reactions

Red Hat triaged the vulnerability at high severity and issued multiple errata for Red Hat Satellite products within approximately five weeks of disclosure. Microsoft acknowledged the vulnerability in its September 2025 Patch Tuesday update guide. Rapid7 included CVE-2025-57052 in its September 2025 Patch Tuesday analysis. Community discussion has been observed on Bluesky and Reddit (notably in the Fortinet community regarding FortiClientEMS), reflecting broad concern about the library's wide deployment footprint (Rapid7 Blog, Microsoft MSRC).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-68981HIGH8.8
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026
CVE-2026-69153MEDIUM6.3
  • JavaScript logoJavaScript
  • pcs
NoYesAug 03, 2026
CVE-2026-68979MEDIUM5.9
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026
CVE-2026-68980LOW2.3
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026
CVE-2026-54522LOW2.1
  • Ruby logoRuby
  • ruby4.0-msgpack
NoYesJul 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management