CVE-2026-67216: Algorithmic Complexity DoS in cJSON cJSON_Compare()
- Vendor
- Davegamble
CVE-2026-67216 is a denial-of-service vulnerability in cJSON through version 1.7.19 caused by inefficient algorithmic complexity in the cJSON_Compare() function. During object equality checks, the function recursively traverses each shared subtree twice, once in each direction, and does so without a recursion depth guard. This causes the comparison cost to grow exponentially with nesting depth. As a result, even a small but deeply nested JSON document can trigger extremely long processing times when compared for equality against a structurally equal reference object. Applications that pass attacker-influenced JSON into cJSON_Compare() are exposed to CPU exhaustion and resulting availability loss.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation causes excessive CPU consumption and can deny service to the affected application or system component performing the comparison. The primary effect is availability degradation or complete service disruption while the process spends prolonged time evaluating deeply nested, structurally equal JSON objects. The issue does not indicate direct confidentiality or integrity impact, but it can materially impair responsiveness and capacity of network-facing or backend services that compare untrusted JSON inputs.
Mitigation
If you can’t patch tonight, do this now.
Do not call cJSON_Compare() on attacker-controlled or attacker-influenced JSON unless strict structural validation is performed first. Enforce maximum nesting-depth limits on parsed JSON before comparison, reject excessively nested inputs, and prefer alternative comparison logic that has predictable complexity. Where possible, isolate or rate-limit comparison operations on untrusted data to reduce the impact of CPU-exhaustion attempts.
Remediation
Patch, then assume compromise.
Upgrade cJSON to a patched release newer than 1.7.19 once one is available. If maintaining a fork or vendored copy, modify the comparison logic in cJSON_Compare() to eliminate the exponential recursive behavior and introduce appropriate recursion or nesting-depth limits. Review all applications and embedded components that vendor cJSON to ensure the fix is applied consistently wherever the library is bundled rather than dynamically linked.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-67216 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-67216 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-67216?
- Yes. As of Sep 25, 2026, Mallory has reports of a public exploit for CVE-2026-67216.
- Is there a patch for CVE-2026-67216?
- Upgrade cJSON to a patched release newer than 1.7.19 once one is available. If maintaining a fork or vendored copy, modify the comparison logic in cJSON_Compare() to eliminate the exponential recursive behavior and introduce appropriate recursion or nesting-depth limits.
- What products are affected by CVE-2026-67216?
- Davegamble Cjson.
- How severe is CVE-2026-67216?
- CVE-2026-67216 has a CVSS v4 score of 8.2 (High) and an EPSS score of 0.65% (46th percentile) as of Sep 25, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.