Skip to content
OpenAdvisories
Medium · 5.9 CVE-2026-67216 EUVD-2026-50328GHSA-ff2v-f99f-wm3f

cJSON cJSON_Compare Exponential Complexity Denial of Service

Published Jul 29, 2026 · Updated Jul 30, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
DaveGamble cJSON ≤ 1.7.19 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 cjson No fix yet —
Debian 13 cjson No fix yet —
Debian 12 cjson No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 cjson +3 No fix yet —
Ubuntu 26.04 LTS cjson +3 No fix yet —
Ubuntu 24.04 LTS mapcache No fix yet —
Ubuntu 22.04 LTS mapcache No fix yet —
Ubuntu 20.04 LTS mapcache No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS mapcache No fix yet —
Ubuntu 16.04 LTS mapcache No fix yet —
Ubuntu Pro 24.04 LTS cjson +1 No fix yet —
Ubuntu Pro 22.04 LTS cjson +1 No fix yet —
Ubuntu Pro 20.04 LTS cjson +1 No fix yet —
Ubuntu Pro 18.04 LTS iperf3 No fix yet —
Ubuntu Pro 16.04 LTS iperf3 No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 apparmor No fix yet —

References