Skip to main content

cJSON CVE-2026-67216

| EUVDEUVD-2026-50328 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-07-29 VulnCheck GHSA-ff2v-f99f-wm3f
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint comparing JSON via cJSON_Compare
  2. Delivery
    Craft tiny deeply-nested structurally-equal document
  3. Exploit
    Submit payload over network
  4. Execution
    Trigger exponential double-recursion in compare
  5. Persist
    Exhaust CPU on worker
  6. Impact
    Deny 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

cJSON 0 ≤1.7.19

Affected Packages

euvd cjson no fix

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

Vendor (VulnCheck) PRIMARY 8.2 HIGH
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
vuln.today AI 5.9 MEDIUM

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).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 5.9 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 76% exploitable
Prevalence
High
cJSON is among the most widely vendored C JSON parsers in firmware and IoT
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Cjson

View all
CVE-2025-57052 CRITICAL POC
9.8 Sep 03

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

CVE-2019-11835 CRITICAL POC
9.8 May 09

cJSON before 1.7.11 allows out-of-bounds access, related to multiline comments. Rated critical severity (CVSS 9.8), this

CVE-2019-11834 CRITICAL POC
9.8 May 09

cJSON before 1.7.11 allows out-of-bounds access, related to \x00 in a string literal. Rated critical severity (CVSS 9.8)

CVE-2018-1000217 CRITICAL POC
9.8 Aug 20

Dave Gamble cJSON version 1.7.3 and earlier contains a CWE-416: Use After Free vulnerability in cJSON library that can r

CVE-2018-1000216 HIGH POC
8.8 Aug 20

Dave Gamble cJSON version 1.7.2 and earlier contains a CWE-415: Double Free vulnerability in cJSON library that can resu

CVE-2024-31755 HIGH POC
7.6 Apr 26

cJSON v1.7.17 was discovered to contain a segmentation violation, which can trigger through the second parameter of func

CVE-2023-50472 HIGH POC
7.5 Dec 14

cJSON v1.7.16 was discovered to contain a segmentation violation via the function cJSON_SetValuestring at cJSON.c. Rated

CVE-2023-50471 HIGH POC
7.5 Dec 14

cJSON v1.7.16 was discovered to contain a segmentation violation via the function cJSON_InsertItemInArray at cJSON.c. Ra

CVE-2019-1010239 HIGH POC
7.5 Jul 19

DaveGamble/cJSON cJSON 1.7.8 is affected by: Improper Check for Unusual or Exceptional Conditions. Rated high severity (

CVE-2026-87933 MEDIUM POC
5.5 Sep 10

Heap use-after-free in DaveGamble cJSON's cJSONUtils_MergePatch function (cJSON_Utils.c) affects all versions through 1.

CVE-2026-67215 HIGH
8.7 Jul 29

Denial of service in cJSON (DaveGamble's C JSON parser) through version 1.7.19 lets a remote attacker crash any applicat

CVE-2018-1000215 HIGH
7.5 Aug 20

Dave Gamble cJSON version 1.7.6 and earlier contains a CWE-772 vulnerability in cJSON library that can result in Denial

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy