Skip to main content

cJSON CVE-2026-87933

| EUVDEUVD-2026-75225 MEDIUM
Use After Free (CWE-416)
2026-09-10 VulDB GHSA-7jcg-95pj-h5fp
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Send crafted JSON to a cJSON merge-patch endpoint
  2. Delivery
    Application extracts patch as a subtree of target
  3. Exploit
    cJSONUtils_MergePatch called with aliased pointers
  4. Execution
    cJSON_Delete(target) frees patch memory
  5. Persist
    cJSON_Duplicate reads freed heap region
  6. Impact
    Crash, heap disclosure, or memory corruption

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the consuming application call cJSONUtils_MergePatch(target, patch) where the patch pointer is a node within target's own allocated tree - specifically, a subtree obtained via cJSON_GetObjectItem() or equivalent on the same target object, rather than an independently parsed or constructed JSON value. This aliasing pattern is uncommon in typical usage but can occur in applications that allow clients to specify which existing field to use as the patch. Applications that always construct patch objects independently from target objects are not vulnerable. Additionally, reliable code execution beyond DoS requires a favourable heap layout following the free, which is allocator- and platform-dependent and not guaranteed.

Impact

The CVSS 4.0 score of 6.9 with AV:N/AC:L/PR:N/UI:N reflects a remotely triggerable flaw in an unauthenticated context, but the AC:L rating warrants scrutiny. The UAF fires only when the patch argument is a pointer into the target's own JSON tree - an application-level aliasing condition that many call sites will not produce naturally. In practice, exploitability depends heavily on how the consuming application wires the merge-patch API: if an attacker controls a JSON endpoint that applies a user-supplied patch to an object containing the user's own sub-fields, the condition can be engineered, but a typical server-side usage with independently constructed patch objects would not be vulnerable. A public PoC exists (E:P in the provided CVSS 4.0), which meaningfully raises urgency. No CISA KEV listing is present and no EPSS data was provided. The primary confirmed impact is heap-use-after-free leading to crash (DoS); memory disclosure or arbitrary code execution are theoretically possible depending on heap layout and allocator behaviour but are not confirmed by available data.

Exploit ScenarioDerived

An attacker sends a crafted JSON payload to a REST API or embedded device endpoint that internally extracts a sub-field from the stored target document and passes it as the patch argument to cJSONUtils_MergePatch() - for example, an update handler that merges a user-nominated key from an existing record back onto the record itself. When cJSON_Delete(target) executes, the patch memory is freed mid-operation, and the subsequent cJSON_Duplicate() reads the freed heap region, causing a crash or potentially leaking heap metadata. A public PoC demonstrating this scenario with AddressSanitizer output is available at https://github.com/DaveGamble/cJSON/issues/1060.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 10, 2026

Heap use-after-free in DaveGamble cJSON's cJSONUtils_MergePatch function (cJSON_Utils.c) affects all versions through 1.7.19 when the patch argument is a subtree of the target object. The function deletes the target before duplicating the patch, freeing the patch memory and causing a subsequent read of freed heap - confirmed by an AddressSanitizer-triggering test case in upstream fix PR #1065. A public exploit exists (GitHub issue #1060) and can lead to crash, potential memory disclosure, or memory corruption in any application that passes attacker-influenced JSON through this specific merge-patch call pattern.

RemediationAI

A fix is available as GitHub PR #1065 (https://github.com/DaveGamble/cJSON/pull/1065) against the main branch, but it had not been merged into a tagged release at time of analysis - the description explicitly states the PR 'awaits acceptance', so a released patched version is not independently confirmed. Maintainers or downstream consumers should apply the one-line ordering change from PR #1065 to their local copy: call cJSON_Duplicate(patch, 1) and store the result before calling cJSON_Delete(target), then return the duplicate. As an immediate compensating control, callers of cJSONUtils_MergePatch() should ensure the patch argument is always an independently allocated tree with no shared ownership with target, eliminating the aliasing condition that triggers the UAF. Applications that do not call cJSONUtils_MergePatch() at all are unaffected.

Affected VersionsENISA

cJSON 1.7.11
cJSON 1.7.6
cJSON 1.7.17
cJSON 1.7.0
cJSON 1.7.18
cJSON 1.7.7
cJSON 1.7.9
cJSON 1.7.10
cJSON 1.7.19
cJSON 1.7.13
cJSON 1.7.14
cJSON 1.7.2
cJSON 1.7.3
cJSON 1.7.5
cJSON 1.7.1
cJSON 1.7.12
cJSON 1.7.15
cJSON 1.7.4
cJSON 1.7.8
cJSON 1.7.16

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 (CPE: cpe:2.3:a:davegamble:cjson:*) is a lightweight, single-file JSON parser and builder written in C, widely embedded in firmware, IoT devices, and C-based application stacks. The cJSON_Utils.c module implements RFC 7396 JSON Merge Patch via cJSONUtils_MergePatch(). The root cause (CWE-416: Use After Free) is an ordering bug in the internal merge_patch() helper: when the patch pointer refers to a node inside the target tree, calling cJSON_Delete(target) frees the memory backing the patch, then the immediately following cJSON_Duplicate(patch, 1) reads that freed memory. The fix in PR #1065 duplicates the patch before deleting the target - the comment in the diff explicitly documents the aliasing hazard: 'otherwise cJSON_Delete(target) would free the patch memory and the subsequent cJSON_Duplicate would read freed memory.'

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 (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 5.6 MEDIUM

AC:H because the UAF triggers only when patch is aliased as a subtree of target, a specific application-level condition absent from typical usage; C/I/A:L reflects UAF impact class without confirmed full code execution.

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

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

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

Lifecycle Timeline

2
CVSS changed
Sep 10, 2026 - 01:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
CVE Published
Sep 10, 2026 - 00:15 cve.org
MEDIUM 6.9

DescriptionCVE.org

A vulnerability was found in DaveGamble cJSON up to 1.7.19. The affected element is the function cJSONUtils_MergePatch of the file cJSON_Utils.c. The manipulation results in use after free. The attack may be launched remotely. The exploit has been made public and could be used. The pull request to fix this issue awaits acceptance.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Medium
popular lightweight C JSON library, widely used in embedded and IoT
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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-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-2026-67216 HIGH
8.2 Jul 29

Denial of service in the cJSON C library (versions through 1.7.19) arises from exponential algorithmic complexity in the

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

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