Skip to content
OpenAdvisories
High · 7.5 CVE-2026-67215 EUVD-2026-50327GHSA-5q3m-r3x7-8phg

cJSON JSON Patch copy/add Uncontrolled Recursion Stack Exhaustion

Published Jul 29, 2026 · Updated Jul 29, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
DaveGamble cJSON ≤ 1.7.19 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 cjson No fix yet —
Debian 13 cjson No fix yet —
Debian 12 cjson No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 cjson No fix yet —
Ubuntu 26.04 LTS cjson No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS cjson No fix yet —
Ubuntu Pro 22.04 LTS cjson No fix yet —
Ubuntu Pro 20.04 LTS cjson No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 apparmor +1 No fix yet —

References