#1146718 cjson: CVE-2026-29036

Package:
src:cjson
Source:
src:cjson
Submitter:
Salvatore Bonaccorso
Date:
2026-11-03 05:25:02 UTC
Severity:
normal
Tags:
#1146718#5
Date:
2026-09-04 18:46:32 UTC
From:
To:
Hi,

The following vulnerability was published for cjson.

CVE-2026-29036[0]:
| cJSON versions 1.5.0 through 1.7.19 contain an incorrectly-resolved
| name or reference vulnerability in the decode_pointer_inplace()
| function within cJSON_Utils.c that allows unauthenticated attackers
| to cause JSON Patch operations to target wrong object keys by
| supplying crafted JSON Pointer escape sequences (~0 or ~1) in patch
| paths. Attackers can submit malicious RFC 6902 JSON Patch input to
| applications using cJSONUtils_ApplyPatches() or
| cJSONUtils_ApplyPatchesCaseSensitive() to silently corrupt data or
| delete unintended keys, potentially bypassing authorization controls
| in applications that rely on JSON Patch for access-controlled data
| modification.

Can you please check for a respective upstream report and report back?


If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-29036
https://www.cve.org/CVERecord?id=CVE-2026-29036

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore

#1146718#10
Date:
2026-11-03 05:23:50 UTC
From:
To:
Hi,

Upstream has an open, mergeable pull request that names this CVE:

https://www.google.com/url?q=https://github.com/DaveGamble/cJSON/pull/1120&source=gmail&ust=1793769830333000&sa=E
"utils: fix decode_pointer_inplace dropping bytes after escapes
(CVE-2026-29036)"
cJSON_Utils.c +15 -4, plus new cases in
tests/json-patch-tests/cjson-utils-tests.json

Several older PRs (#1001, #1019, #1098) also target the ~1 decoding in
decode_pointer_inplace(); #1120 is the one that references the CVE.

Verified on the Debian 1.7.19-2 source with its patch applied. The PR
applies cleanly. I built with cmake, -DENABLE_CJSON_UTILS=On and
-DENABLE_SANITIZERS=On (ASan+UBSan, leak checking on):

- Full test suite with the PR: 22/22 passed, no sanitizer reports.
- The PR's new json_patch_tests cases run against unpatched 1.7.19-2:
json_patch_test_cjson_utils_tests fails ("Expected 0 Was 13. Failed to
apply patches"). With the PR, it passes.

The PR is still unmerged upstream, so it may be worth waiting for review
there, or carrying it as a patch if upstream stays quiet.

Thanks!