CVE-2026-67215 in cJSONinfo

Summary

by MITRE • 07/29/2026

cJSON through 1.7.19 is vulnerable to uncontrolled recursion leading to stack exhaustion when an untrusted RFC 6902 JSON Patch is applied via cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive(). A patch containing add and copy operations grafts duplicated subtrees to amplify document depth beyond the parser's nesting limit: cJSON_Delete() recurses with no depth bound, and the cJSON_Duplicate() guard CJSON_CIRCULAR_LIMIT is set to 10000, ten times the parser's 1000-level nesting limit and high enough to overflow a default thread stack. An attacker who can supply the patch document can crash the process, resulting in denial of service.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 07/29/2026

The vulnerability in cJSON versions through 1.7.19 represents a critical stack exhaustion issue that stems from uncontrolled recursion during JSON Patch processing operations. This flaw specifically affects the cJSONUtils_ApplyPatches() and cJSONUtils_ApplyPatchesCaseSensitive() functions, which are designed to apply RFC 6902 JSON patches to existing documents. The vulnerability manifests when an attacker crafts a malicious patch document containing add and copy operations that recursively graft duplicated subtrees, effectively amplifying the document depth beyond the parser's configured nesting limit of 1000 levels. This recursive duplication mechanism creates a scenario where the cJSON_Delete() function executes without any depth bounds, while the cJSON_Duplicate() guard mechanism sets CJSON_CIRCULAR_LIMIT to 10000, which is ten times the parser's nesting limit and sufficiently large to overflow default thread stack allocations.

The operational impact of this vulnerability extends beyond simple denial of service, as it enables attackers to crash processes through carefully constructed JSON patch documents that exploit the recursive nature of the processing functions. When an attacker supplies a malicious patch document, the system becomes vulnerable to stack exhaustion attacks that can cause complete process termination and system instability. The vulnerability is particularly dangerous because it allows for remote code execution in contexts where cJSON is used to process untrusted input from external sources, making it a significant concern for web applications, API services, and any systems that handle JSON data processing from unknown origins.

Security practitioners should recognize this issue as a classic example of CWE-674 - Uncontrolled Recursion, which falls under the broader category of software vulnerabilities related to inadequate input validation and recursive function handling. The ATT&CK framework would categorize this vulnerability within the Privilege Escalation and Denial of Service tactics, as it can be exploited to cause system instability and potentially gain unauthorized access through service disruption. The vulnerability's exploitation requires no special privileges beyond the ability to submit JSON patch documents to a vulnerable system, making it particularly dangerous in multi-user environments or public-facing applications.

Mitigation strategies should include immediate upgrading to cJSON version 1.7.20 or later, which contains fixes for this recursion issue by implementing proper depth bounds and stack overflow protection mechanisms. Organizations should also consider implementing input validation and sanitization measures that limit the complexity of JSON patches before they are processed by the cJSON library. Additionally, deploying runtime protections such as stack canaries, address space layout randomization, and process monitoring can help detect and prevent exploitation attempts. System administrators should monitor for unusual memory consumption patterns and implement rate limiting on JSON patch processing operations to reduce the effectiveness of potential denial of service attacks. The vulnerability highlights the importance of proper recursion bounds in parsing libraries and demonstrates how seemingly benign operations like JSON patch application can become security risks when recursive processing is not properly constrained.

Responsible

VulnCheck

Reservation

07/28/2026

Disclosure

07/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!