CVE-2026-67216 cJSON cJSON_Compare Exponential Complexity Denial of Service
An attacker can cause a denial of service by providing deeply nested JSON to cJSON_Compare, leading to exponential CPU consumption.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-67216?
CVE-2026-67216 is a high-severity denial of service vulnerability in DaveGamble cJSON, published on 29 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
cJSON through 1.7.19 contains an inefficient algorithmic complexity flaw in cJSON_Compare(). When comparing objects, the function recurses into each shared subtree twice, once in each direction, with no depth guard, making the running time exponential in nesting depth. A small, deeply nested document of a few hundred bytes (depth around 40) compared for equality consumes hours of CPU, and the cost roughly doubles with each additional level of nesting. An application that calls cJSON_Compare() on attacker-influenced JSON that is structurally equal to a reference document is exposed to a denial-of-service condition.
Weakness: CWE-407
Which versions are affected by CVE-2026-67216?
It affects 1 product.
Products include Davegamble Cjson.
How do I fix CVE-2026-67216?
Upgrade to a fixed version.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-67216 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-67216 exists.
Other vulnerabilities in DaveGamble cJSON
Sources
Also known as AZL-94407, DEBIAN-CVE-2026-67216, ECHO-a8fe-5bd2-dfa4, GHSA-ff2v-f99f-wm3f, ROOT-OS-ALPINE-321-CVE-2026-67216, ROOT-OS-ALPINE-323-CVE-2026-67216 and 1 more.