Skip to main content
EPSS 0.4%top 64%

CVE-2026-67216: Inefficient Algorithmic Complexity in DaveGamble cJSON

0
High
Published: 07/29/2026 (07/29/2026, 14:16:00 UTC)
Source: CVE Database V5
Vendor/Project: DaveGamble
Product: cJSON

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.

CVSS v4.0

Score 8.2high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected software

DaveGamble

cJSON

Affected versions
>=0 <=1.7.19
GitHub Actionsmore threats →ai
davegamble/cJSON
pkg:github/davegamble/cJSON
Affected versions
<=1.7.19

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

AILast updated: 08/05/2026, 14:40:18 UTC

Technical Analysis

The vulnerability in cJSON up to version 1.7.19 is due to inefficient algorithmic complexity in the cJSON_Compare() function. When comparing JSON objects, the function recursively processes each shared subtree twice, once in each direction, without limiting recursion depth. This behavior causes the running time to grow exponentially with the nesting depth of the JSON document. As a result, even small JSON documents with deep nesting (around 40 levels) can cause the comparison to take hours of CPU time. An attacker can exploit this by providing crafted JSON data that is structurally equal to a reference document, triggering a denial-of-service condition through excessive CPU consumption.

Potential Impact

Applications using vulnerable versions of cJSON that call cJSON_Compare() on attacker-controlled JSON data may experience denial-of-service due to excessive CPU usage. The exponential time complexity can severely degrade performance, potentially making the application unresponsive or causing resource exhaustion.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid calling cJSON_Compare() on untrusted or attacker-influenced JSON data with deep nesting. Consider implementing application-level limits on JSON nesting depth or using alternative JSON comparison methods that do not exhibit this inefficiency.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-07-28T19:20:19.157Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a6a093d9c2644c7f89a31ca

Added to database: 07/29/2026, 14:07:57 UTC

Last enriched: 08/05/2026, 14:40:18 UTC

Last updated: 09/12/2026, 10:01:32 UTC

Views: 88

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses