CVE-2026-67216: Inefficient Algorithmic Complexity in DaveGamble cJSON
cJSON versions up to 1.7.19 contain an inefficient algorithmic complexity flaw in the cJSON_Compare() function. This flaw causes the function to recurse into each shared subtree twice without a depth guard, resulting in exponential running time relative to JSON nesting depth. Deeply nested JSON documents can cause the comparison to consume hours of CPU time, leading to a denial-of-service condition when attacker-controlled JSON is compared.
AI Analysis
Technical Summary
The vulnerability in cJSON (up to version 1.7.19) lies in the cJSON_Compare() function, which inefficiently compares JSON objects by recursively traversing shared subtrees twice without limiting recursion depth. This results in exponential time complexity as nesting depth increases. An attacker can exploit this by providing deeply nested JSON data that is structurally equal to a reference document, causing the application to spend excessive CPU resources and potentially become unresponsive due to denial of service.
Potential Impact
Applications using vulnerable versions of cJSON that call cJSON_Compare() on attacker-controlled JSON data may experience denial-of-service conditions due to excessive CPU consumption. The impact is a high-severity resource exhaustion vulnerability that can degrade or halt application functionality.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, consider avoiding the use of cJSON_Compare() on untrusted or attacker-influenced JSON data or implement application-level limits on JSON nesting depth to mitigate potential denial-of-service risks.
CVE-2026-67216: Inefficient Algorithmic Complexity in DaveGamble cJSON
Description
cJSON versions up to 1.7.19 contain an inefficient algorithmic complexity flaw in the cJSON_Compare() function. This flaw causes the function to recurse into each shared subtree twice without a depth guard, resulting in exponential running time relative to JSON nesting depth. Deeply nested JSON documents can cause the comparison to consume hours of CPU time, leading to a denial-of-service condition when attacker-controlled JSON is compared.
CVSS v4.0
Score 8.2high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in cJSON (up to version 1.7.19) lies in the cJSON_Compare() function, which inefficiently compares JSON objects by recursively traversing shared subtrees twice without limiting recursion depth. This results in exponential time complexity as nesting depth increases. An attacker can exploit this by providing deeply nested JSON data that is structurally equal to a reference document, causing the application to spend excessive CPU resources and potentially become unresponsive due to denial of service.
Potential Impact
Applications using vulnerable versions of cJSON that call cJSON_Compare() on attacker-controlled JSON data may experience denial-of-service conditions due to excessive CPU consumption. The impact is a high-severity resource exhaustion vulnerability that can degrade or halt application functionality.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, consider avoiding the use of cJSON_Compare() on untrusted or attacker-influenced JSON data or implement application-level limits on JSON nesting depth to mitigate potential denial-of-service risks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-28T19:20:19.157Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6a093d9c2644c7f89a31ca
Added to database: 07/29/2026, 14:07:57 UTC
Last enriched: 07/29/2026, 14:22:34 UTC
Last updated: 07/29/2026, 14:47:55 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.