CVE-2026-67216
JSON

8.2high

cJSON cJSON_Compare Exponential Complexity Denial of Service

Severity
8.2high CVSS:4.0 by VulnCheck
Exploit likelihood
0.43% (higher than 38% of CVEs; EPSS, by FIRST)
Published
Last changed
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

Product or packageVersionsReported by
DaveGamble cJSONup to 1.7.19CVE List, NVD

All scores

VulnCheck8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
VulnCheck5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-407

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

cJSON hasta la versión 1.7.19 contiene una falla de complejidad algorítmica ineficiente en cJSON_Compare(). Al comparar objetos, la función recurre en cada subárbol compartido dos veces, una vez en cada dirección, sin un límite de profundidad, lo que hace que el tiempo de ejecución sea exponencial en la profundidad de anidamiento. Un documento pequeño, profundamente anidado, de unos pocos cientos de bytes (profundidad alrededor de 40) comparado por igualdad consume horas de CPU, y el costo se duplica aproximadamente con cada nivel adicional de anidamiento. Una aplicación que llama a cJSON_Compare() en JSON influenciado por el atacante que es estructuralmente igual a un documento de referencia está expuesta a una condición de denegación de servicio.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-67216 changed 2026-07-30CVE Terms of Use
NVDCVE-2026-67216 changed 2026-10-23Public domain