33 cJSON flaws expose applications to DoS, memory-safety, and data integrity risks
Vulnerability Disclosure · 7 sources · Updated 4mo ago · First seen Jul 30, 2026

A public disclosure detailed 33 vulnerabilities in the widely used C JSON library cJSON, affecting versions through 1.7.19 and prompting warnings for organizations that parse attacker-controlled JSON. The reported issues include memory-safety bugs, denial-of-service conditions, and logic flaws that can cause silent data loss or operations on the wrong object member. An oss-sec post said some of the problems had previously been reported with proof-of-concept code and unmerged fixes, while the library's development was described as largely stagnant.
One of the tracked issues, CVE-2026-67216, is a CWE-407 algorithmic complexity flaw in cJSON_Compare() that can be exploited for remote CPU exhaustion. The vulnerable function recursively traverses shared JSON subtrees twice without a depth guard, causing comparison time to grow exponentially with nesting depth; a small but deeply nested JSON document can therefore tie up a system for hours. Advisories recommend upgrading to a patched release when available, avoiding cJSON_Compare() on deeply nested input, validating JSON structure before comparison, and assessing whether cJSON should be replaced in exposed applications.
Why it matters
Impact assessment
cJSON is widely deployed across server-side C software, embedded firmware, and ESP-IDF-based products, so exposure is potentially broad wherever applications parse attacker-controlled JSON. The disclosed issue set includes denial-of-service, memory-safety, and logic flaws, creating risk of service disruption, crashes, and silent data integrity failures rather than a single isolated bug class.
The most concrete currently tracked issue is CVE-2026-67216, which is remotely exploitable for CPU exhaustion when applications compare attacker-influenced JSON using cJSON_Compare(). Exploitation scope is likely selective to applications that both accept untrusted JSON and invoke vulnerable comparison logic, but the overall 33-flaw disclosure warrants wider exposure review because affected versions reportedly include all releases through 1.7.19 and no broadly available fixed release was noted in the references.
Affected populations
- Organizations using cJSON in internet-facing or API-driven C applications
- Embedded device vendors and operators using vendored cJSON in firmware
- ESP-IDF-based products that include cJSON
- Legacy 32-bit and mixed-architecture environments where cJSON remains present
Severity and business impact
- Availability impact: remote CPU exhaustion and denial of service
- Reliability impact: crashes from memory-safety issues
- Integrity impact: silent data loss and operations on the wrong object member from logic flaws
- Operational impact: difficult triage because some proof-of-concept cases may return NULL instead of crashing in optimized or partially instrumented builds
Scope and exploitation status
- Scope is potentially widespread due to cJSON’s broad reuse and vendoring
- Practical exploitability depends on whether untrusted JSON reaches vulnerable parsing or comparison paths
- The references describe public proof-of-concept material for some issues
- No confirmed in-the-wild exploitation is stated in the provided references


