Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify endpoint comparing JSON via cJSON_Compare
-
DeliveryCraft tiny deeply-nested structurally-equal document
-
ExploitSubmit payload over network
-
ExecutionTrigger exponential double-recursion in compare
-
PersistExhaust CPU on worker
-
ImpactDeny service to legitimate users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that the target application actually call cJSON_Compare() on JSON the attacker can influence AND that this input be structurally equal to the reference document it is compared against - this is precisely the AT:P attack requirement in the CVSS vector, not an optional detail. The malicious document must be deeply nested (the description cites depth ~40 to reach multi-hour CPU cost); shallow documents, however large, do not produce meaningful amplification. No authentication is required per PR:N and no user interaction per UI:N. The principal limiting factor is code-path reachability: deployments that never invoke cJSON_Compare on external input, or that impose a nesting-depth limit before comparison, are not exposed regardless of the cJSON version in use. |
| Impact | The supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H, base 8.2) captures the profile well: network-reachable, no privileges or user interaction, availability-only impact, but with AT:P (Attack Requirements Present) reflecting a genuine precondition - the attacker input must be structurally equal to a reference document being compared. That AT:P is the key nuance: this is not a fire-and-forget crash but requires the vulnerable code path (cJSON_Compare against attacker-influenced data) to actually exist in the deployed application, which many cJSON consumers never invoke. No EPSS score, KEV listing, or POC was provided, so there is no evidence of active or automated exploitation; the 8.2 severity is driven by the amplification factor (a few hundred bytes to hours of CPU) rather than by breadth or ease of triggering. Realistic priority is elevated for any service that compares untrusted JSON against a template using cJSON, and low for the majority of deployments that never pass external input to cJSON_Compare. Note also that the input Tag 'Information Disclosure' conflicts with the description and CVSS (pure availability/DoS) - the tag appears mislabeled and should not be read as an info-leak. |
| Exploit ScenarioDerived | An application uses cJSON_Compare() to check whether an incoming JSON payload matches a reference or template document (for example, verifying a config object or webhook body against an expected structure). An attacker submits a small (~few hundred bytes) but deeply nested JSON document (depth ~40) that is structurally equal to the reference; the comparison enters exponential double-recursion and consumes hours of CPU, exhausting the worker and denying service. No public POC is referenced, but the joshua.hu write-up describes the algorithmic behavior in enough detail to reconstruct the trigger. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 29, 2026
Denial of service in the cJSON C library (versions through 1.7.19) arises from exponential algorithmic complexity in the cJSON_Compare() function, which recursively descends into each shared object subtree twice per level with no depth guard. Applications that call cJSON_Compare() on attacker-influenced JSON that is structurally equal to a reference document can be forced to burn hours of CPU on a document of only a few hundred bytes (nesting depth around 40), with cost roughly doubling per added level. No public exploit identified at time of analysis and the issue is not on CISA KEV; impact is compute exhaustion only, with no confidentiality or integrity effect.
RemediationAI
No vendor-released patch identified at time of analysis - the references point to the vulnerable v1.7.19 source and advisories rather than a tagged fixed release, so upgrade to a fixed cJSON version once published and monitor the DaveGamble/cJSON repository and the VulnCheck advisory (https://www.vulncheck.com/advisories/cjson-cjson-compare-exponential-complexity-denial-of-service). As concrete interim controls: avoid calling cJSON_Compare() on untrusted JSON - replace equality checks with a bounded comparison or normalize/validate input first; enforce a maximum JSON nesting depth (for example reject documents deeper than 20-30 levels) before comparison, since the attack depends on deep nesting rather than size, accepting that this may reject legitimately deep but benign payloads; wrap comparison calls in a per-request CPU/time budget or watchdog so a runaway compare is aborted rather than pinning a core; and treat request-body size limits only as a weak secondary control because a few-hundred-byte document already suffices. The technical write-up at https://joshua.hu/cjson-json-parser-cve-vulnerabilities details the root cause for anyone applying a local patch.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
cJSON is a widely used, ultralight JSON parser and manipulation library written in C by Dave Gamble, commonly embedded in firmware, IoT devices, and native applications. The flaw is classed as CWE-407 (Inefficient Algorithmic Complexity). In cJSON_Compare() (see cJSON.c lines ~3057-3180 in v1.7.19), object comparison walks shared keys and recurses into each matching subtree in both directions without memoization or a recursion/depth limit, so equal nested structures are revisited redundantly at every level. Running time therefore grows exponentially with nesting depth rather than linearly with document size, making input byte-size a poor proxy for cost - a tiny but deeply nested document dominates CPU. The vendor CPE identifies the affected component as cpe:2.3:a:davegamble:cjson.
Know when Cjson gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable DoS with no auth or interaction, but AC:H because the payload must be deeply nested and structurally equal to the compared reference; availability-only impact (A:H, C/I:N).
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
The cJSON library (versions through 1.7.19) is vulnerable to denial-of-service attacks that can render applications unusable through resource exhaustion. Attackers can submit specially crafted JSON documents of only a few hundred bytes that consume hours of CPU processing, causing application slowdowns or complete outages. Organizations must immediately inventory affected deployments and implement controls to prevent service disruption.
No vendor-released patch identified at time of analysis. Interim mitigations: Restrict cJSON_Compare() function usage to trusted data only; implement timeout controls on comparison operations; validate and limit JSON nesting depth (recommend maximum 20-30 levels) before parsing; deploy CPU usage monitoring and alerting; implement rate-limiting on JSON processing; evaluate and plan migration to alternative JSON libraries with built-in recursion depth validation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
cJSON 1.5.0 through 1.7.18 allows out-of-bounds access via the decode_array_index_from_pointer function in cJSON_Utils.c
cJSON before 1.7.11 allows out-of-bounds access, related to multiline comments. Rated critical severity (CVSS 9.8), this
cJSON before 1.7.11 allows out-of-bounds access, related to \x00 in a string literal. Rated critical severity (CVSS 9.8)
Dave Gamble cJSON version 1.7.3 and earlier contains a CWE-416: Use After Free vulnerability in cJSON library that can r
Dave Gamble cJSON version 1.7.2 and earlier contains a CWE-415: Double Free vulnerability in cJSON library that can resu
cJSON v1.7.17 was discovered to contain a segmentation violation, which can trigger through the second parameter of func
cJSON v1.7.16 was discovered to contain a segmentation violation via the function cJSON_SetValuestring at cJSON.c. Rated
cJSON v1.7.16 was discovered to contain a segmentation violation via the function cJSON_InsertItemInArray at cJSON.c. Ra
DaveGamble/cJSON cJSON 1.7.8 is affected by: Improper Check for Unusual or Exceptional Conditions. Rated high severity (
Heap use-after-free in DaveGamble cJSON's cJSONUtils_MergePatch function (cJSON_Utils.c) affects all versions through 1.
Denial of service in cJSON (DaveGamble's C JSON parser) through version 1.7.19 lets a remote attacker crash any applicat
Dave Gamble cJSON version 1.7.6 and earlier contains a CWE-772 vulnerability in cJSON library that can result in Denial
Same weakness CWE-407 – Inefficient Algorithmic Complexity
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Workstation Extension 15 SP7 | Affected |
| openSUSE Leap 16.0 | Affected |
EUVD-2026-50328
GHSA-ff2v-f99f-wm3f
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB