Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted patch document via network or file input
-
DeliveryEmbed replace operation with missing value member or move with unresolvable destination
-
Exploitapply_patch() detaches and frees target node before completing validation
-
ExecutionAPI returns failure status with document already mutated
-
ImpactApplication error handler executes while relying on now-corrupt document state
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect behavior order
|
| Exploitation Conditions | The attacker must control the patch document - a JSON array of RFC 6902 operations - supplied to cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive(). This requires the application to expose an interface (network API endpoint, file or IPC channel) that accepts externally-controlled patch input without fully sanitizing operation structure before passing it to the cJSON API. The two specific triggering conditions are: (1) a replace operation object where the value key is absent, or (2) a move operation where the to path cannot be resolved in the current target document. Exploitation is limited entirely to the in-memory integrity of the target JSON document - there is no code execution, memory safety violation, or confidentiality breach. Applications that treat any cJSONUtils_ApplyPatches() failure return as a signal to immediately discard and re-initialize the entire target document object sidestep the silent-corruption impact, as do applications that restrict patch input to operation types other than replace and move. |
| Impact | The CVSS 4.0 base score of 6.9 (Medium) reflects broad network accessibility with no required privileges or user interaction (AV:N/AC:L/AT:N/PR:N/UI:N), but the realized impact is bounded to a low integrity violation on the vulnerable system (VI:L) with no confidentiality or availability impact recorded. KEV status is not confirmed and no weaponized exploit has been identified; a researcher blog post at joshua.hu and a direct GitHub source reference are publicly available, which may accelerate exploit development but do not constitute confirmed active exploitation. EPSS data was not provided in the source intelligence, so exploitation probability cannot be quantified. Practical risk is highly application-dependent: the vulnerability is meaningful only where the calling application exposes an interface that accepts attacker-controlled patch documents and relies on cJSONUtils_ApplyPatches() failure status to gate document commits. In IoT firmware, configuration management services, or device state engines where the target document represents authoritative state, silent partial corruption could produce disproportionate operational impact relative to the CVSS VI:L rating. The 'Information Disclosure' tag in source intelligence appears inconsistent with the described integrity-only impact and may reflect a tagging error or an undocumented secondary effect not present in the primary description. |
| Exploit ScenarioDerived | An attacker with the ability to supply a crafted JSON Patch document to a network-facing application built on cJSON submits a replace operation targeting a sensitive configuration key but omits the required value member; apply_patch() deletes the existing key from the document before detecting the missing value and returns an error, but the target document is now permanently missing that key - silently degrading application state even as the caller's error handler executes and believes the patch was rejected. A detailed researcher write-up and direct source code reference are publicly available at joshua.hu and GitHub, which may facilitate exploit development by any party examining the affected code path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 29, 2026
Non-atomic JSON Patch application in cJSON through 1.7.19 allows an attacker who controls the patch document to silently corrupt the target JSON structure even when the API returns a failure status. The apply_patch() function in cJSON_Utils.c deletes existing target members before completing operation validation, meaning a malformed replace (missing value) or move (unresolvable destination) permanently destroys data from the in-memory document tree - defeating the RFC 6902 all-or-nothing contract that callers rely on to reject bad patches safely. No public exploit has been identified at time of analysis, but a detailed researcher disclosure and direct source code reference are publicly available, which may lower the barrier to exploitation; KEV status is not confirmed.
RemediationAI
No vendor-released patch has been identified at time of analysis; the most recent confirmed-affected version is 1.7.19. Operators should monitor the upstream repository at https://github.com/DaveGamble/cJSON for a patched release and upgrade immediately upon availability. As a compensating control, applications that require atomic patch semantics should deep-copy the target cJSON object before invoking cJSONUtils_ApplyPatches() and restore from that copy on any non-success return - this trades a memory allocation per patch call for correctness guarantees and is the most robust workaround. Alternatively, pre-validate patch documents before submission by rejecting any operation array that contains a replace without a value member or a move whose to path does not exist in the current document; this adds per-call validation logic but eliminates the vulnerable deletion-before-validation sequence. Where patch input originates from untrusted external sources, restricting permitted operation types to add and remove (which do not trigger the affected code paths) eliminates exposure at the cost of reduced RFC 6902 coverage. See the VulnCheck advisory for additional context.
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 lightweight, open-source JSON library written in C, maintained by Dave Gamble (CPE: cpe:2.3:a:davegamble:cjson). The affected functionality implements RFC 6902 JSON Patch operations via apply_patch() in cJSON_Utils.c (lines 887-948 of the v1.7.19 source). CWE-696 (Incorrect Behavior Order) precisely describes the root cause: the library detaches and frees the existing target node from the document tree before validating that the replacement value is present or that the move destination path is resolvable. RFC 6902 mandates atomic semantics - all patch operations succeed together or the document is left unchanged. cJSON violates this invariant by sequencing deletion ahead of validation, producing irreversible in-memory mutations even when the function ultimately signals failure. Both cJSONUtils_ApplyPatches() and cJSONUtils_ApplyPatchesCaseSensitive() are affected entry points.
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:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Network vector reflects library use in network-facing services; no privilege required to supply a patch document; scope unchanged and impact limited to low integrity loss with no confidentiality or availability effect.
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
cJSON through 1.7.19 applies RFC 6902 JSON Patch operations non-atomically in apply_patch() in cJSON_Utils.c. For a replace operation that is missing its value member, or a move operation whose destination path cannot be resolved, the existing target member is detached and deleted before the operation is fully validated, so the target document is mutated while cJSONUtils_ApplyPatches() or cJSONUtils_ApplyPatchesCaseSensitive() returns a failure status. An attacker who can supply the patch document can destroy addressable members of the target document even though the API reports that the patch failed, defeating the all-or-nothing behavior callers rely on to reject bad patches.
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
Denial of service in the cJSON C library (versions through 1.7.19) arises from exponential algorithmic complexity in the
Same weakness CWE-696 – Incorrect Behavior Order
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Moderate| 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-50329
GHSA-pr46-97qf-f32c
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB