CVE-2026-67215: cJSON JSON Patch copy/add Uncontrolled Recursion Stack Exhaustion
cJSON through 1.7.19 is vulnerable to uncontrolled recursion leading to stack exhaustion when an untrusted RFC 6902 JSON Patch is applied via cJSONUtilsApplyPatches() or cJSONUtilsApplyPatchesCaseSensitive(). A patch containing add and copy operations grafts duplicated subtrees to amplify document depth beyond the parser's nesting limit: cJSONDelete() recurses with no depth bound, and the cJSONDuplicate() guard CJSONCIRCULARLIMIT 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
cJSONto a version that resolves this vulnerability.Patch cJSON JSON Patch copy/add Uncontrolled Recursion Stack Exhaustion - Compensating control
Do not apply untrusted RFC 6902 JSON Patch documents via cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive(); ensure patch documents are trusted/validated before application to prevent stack exhaustion from uncontrolled recursion.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-67215?
The severity of CVE-2026-67215 is high with a score of 7.5.
What does CVE-2026-67215 vulnerability affect?
CVE-2026-67215 affects cJSON versions up to 1.7.19 which is vulnerable to uncontrolled recursion.
How does CVE-2026-67215 exploit occur?
An exploit occurs when an untrusted RFC 6902 JSON Patch containing add and copy operations is applied, leading to stack exhaustion.
What is the impact of CVE-2026-67215?
The impact of CVE-2026-67215 is denial of service due to stack exhaustion.
How do I fix CVE-2026-67215?
To fix CVE-2026-67215, upgrade to a version of cJSON beyond 1.7.19 that addresses this vulnerability.