Description
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.
Published: 2026-07-29
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

cJSON versions up to 1.7.19 handle RFC 6902 JSON Patch operations by first detaching and deleting target members before fully validating the operation. When a replace operation lacks a value or a move operation points to an unresolvable destination, the library removes the target member while still returning a failure status from the higher‑level functions. This allows an attacker who can supply the patch document to permanently delete addressable members from the JSON structure, violating the expected all‑or‑nothing behavior and compromising data integrity.

Affected Systems

The vulnerability affects any product or system that incorporates DaveGamble cJSON, specifically version 1.7.19 and earlier. This includes open‑source projects, embedded systems, and any application that utilizes cJSON for JSON processing and does not perform additional validation of patch documents.

Risk and Exploitability

The CVSS score of 6.9 indicates medium severity, and the EPSS score of less than 1% suggests a very low likelihood of widespread exploitation in the near term. The vulnerability is not listed in the CISA KEV catalog, which further indicates limited known exploitation. However, the attack vector is inferred to be through any interface that accepts patch documents—such as REST APIs, configuration update endpoints, or user-supplied files—allowing an attacker to craft a malicious patch that deletes critical data. Once applied, the deletion is permanent even though the API signals a failure, effectively bypassing application‑level integrity checks.

Generated by OpenCVE AI on August 3, 2026 at 13:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade cJSON to a version that implements atomic patch application, such as 1.7.20 or later.
  • Redesign or audit code paths that use cJSON's patch functions to add additional checks that confirm the patch failed before accepting any changes to the data structure.
  • If upgrading is not immediately possible, validate patch documents client‑side or in a sandbox environment before passing them to cJSON, rejecting patches that attempt a replace without a value or a move to an invalid destination.

Generated by OpenCVE AI on August 3, 2026 at 13:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 29 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 29 Jul 2026 14:00:00 +0000

Type Values Removed Values Added
Description 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.
Title cJSON JSON Patch Non-Atomic Application Destroys Data Before Validation
First Time appeared Davegamble
Davegamble cjson
Weaknesses CWE-696
CPEs cpe:2.3:a:davegamble:cjson:*:*:*:*:*:*:*:*
Vendors & Products Davegamble
Davegamble cjson
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}

cvssV4_0

{'score': 6.9, 'vector': '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'}


Subscriptions

Davegamble Cjson
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-29T16:00:27.693Z

Reserved: 2026-07-28T19:20:19.157Z

Link: CVE-2026-67217

cve-icon Vulnrichment

Updated: 2026-07-29T14:45:33.558Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-29T14:16:35.477

Modified: 2026-08-04T15:03:41.840

Link: CVE-2026-67217

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T13:30:04Z

Weaknesses