


Perceptive Security
SOC/SIEM Consultancy

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_ApplyPa…
Published:
29 July 2026 at 00:00:00
Alert date:
29 July 2026 at 17:01:32
Source:
nvd.nist.gov
Supply Chain & Dependencies, Web Technologies
cJSON through version 1.7.19 is vulnerable to uncontrolled recursion leading to stack exhaustion when processing untrusted RFC 6902 JSON Patch documents. The vulnerability is triggered via cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive() functions. Malicious patch documents using 'add' and 'copy' operations can duplicate subtrees to amplify document depth beyond the parser's nesting limit. The cJSON_Delete() function recurses without any depth bound, and the cJSON_Duplicate() guard CJSON_CIRCULAR_LIMIT is set to 10000, which is ten times the parser's 1000-level nesting limit. This mismatch is sufficient to overflow a default thread stack on most systems. An attacker who can supply a crafted patch document can crash the process, resulting in a denial of service condition.
Technical details
Mitigation steps:
Affected products:
cJSON 1.7.19
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-67215
https://github.com/DaveGamble/cJSON/blob/v1.7.19/cJSON.c#L253-L261
https://github.com/DaveGamble/cJSON/blob/v1.7.19/cJSON_Utils.c#L906-L940
https://joshua.hu/cjson-json-parser-cve-vulnerabilities
https://www.vulncheck.com/advisories/cjson-json-patch-copy-add-uncontrolled-recursion-stack-exhaustion
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
