cjson — security advisory
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.
- Products
- cjson
- Affected versions
- 1.7.15-1, 1.7.15-1+deb12u1, 1.7.15-1+deb12u2, 1.7.15-1+deb12u3, 1.7.15-1+deb12u4, 1.7.16-1, 1.7.16-2, 1.7.17-1, 1.7.17-2, 1.7.18-1, 1.7.18-2, 1.7.18-3, 1.7.18-3.1, 1.7.18-3.1+deb13u1, 1.7.18-4, 1.7.19-1, 1.7.19-2
- Fixed versions
- Not specified
- CVEs
- CVE-2026-67216
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 04:10 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2026-67216
cjson
Fixed versions: Not specified
cjson
Fixed versions: Not specified
cjson
Fixed versions: Not specified
Complete source record
{
"id": "bc7fb876d631bacb215cff56290c5ce52347fd35b5a1b3fbcbb8d945ea69a9e3",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-67216",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-67216",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2026-67216",
"products": [
{
"name": {
"value": "cjson",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.7.15-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.15-1+deb12u1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.15-1+deb12u2",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.15-1+deb12u3",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.15-1+deb12u4",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.16-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.16-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.17-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.17-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.18-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.18-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.18-3",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.18-3.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.18-4",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.19-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7.19-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "cjson",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.7.18-3.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.18-3.1+deb13u1",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.18-4",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.19-1",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.19-2",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "cjson",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.7.18-3.1",
"evidence": "/affected/2/versions"
},
{
"value": "1.7.18-4",
"evidence": "/affected/2/versions"
},
{
"value": "1.7.19-1",
"evidence": "/affected/2/versions"
},
{
"value": "1.7.19-2",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2026-67216",
"aliases": [
"DEBIAN-CVE-2026-67216"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "cjson",
"purl": "pkg:deb/debian/cjson?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"versions": [
"1.7.15-1",
"1.7.15-1+deb12u1",
"1.7.15-1+deb12u2",
"1.7.15-1+deb12u3",
"1.7.15-1+deb12u4",
"1.7.16-1",
"1.7.16-2",
"1.7.17-1",
"1.7.17-2",
"1.7.18-1",
"1.7.18-2",
"1.7.18-3",
"1.7.18-3.1",
"1.7.18-4",
"1.7.19-1",
"1.7.19-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-67216.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "cjson",
"purl": "pkg:deb/debian/cjson?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"1.7.18-3.1",
"1.7.18-3.1+deb13u1",
"1.7.18-4",
"1.7.19-1",
"1.7.19-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-67216.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "cjson",
"purl": "pkg:deb/debian/cjson?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"1.7.18-3.1",
"1.7.18-4",
"1.7.19-1",
"1.7.19-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-67216.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-24T09:47:36.772854875Z",
"provider": "osv",
"upstream": [
"CVE-2026-67216"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-67216"
]
},
"related_cves": [
{
"value": "CVE-2026-67216",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 429051,
"published_at": "2026-07-29T14:16:35.333+00:00"
}