Cloudanix VulnDB

CVE-2016-4303

Critical · 9.8

CVSS

9.8

EPSS

7.0%

Published

Sep 26, 2016

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a common JSON handling library lets attackers crash programs or take them over by sending specially crafted data, so organizations should update the affected software right away.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in the parse_string function of cJSON triggered by a non-hex character in a UTF-8/16 JSON string, enabling denial of service via crash or arbitrary code execution.

Why it matters to the business

Applications relying on cJSON for JSON parsing risk service outages or full host compromise; the vulnerability affects multiple widely used open-source projects including monitoring tools and system utilities with public exploits available since 2016.

How an attack unfolds

An attacker crafts a malicious JSON payload containing a non-hex character inside a string value and supplies it to any network-facing service that uses the vulnerable cJSON parser; the parse_string routine fails to validate input, overflows a heap buffer, and either crashes the process or allows control-flow hijacking for code execution.

How to fix it

Upgrade affected packages to the listed fixed versions or commits: phpmyadmin to 3081631bd9fe720527fc627b36b4afeff5bf5910, iperf to 57029d80aa19d8708808f80e3e2c0df8986c7c59, prometheus-node-exporter to 1.5.0-r6, and dosfstools to e243612ccd10ec10a9877fe32524acc8b7f3d2a4; rebuild and redeploy any custom applications statically linking the vulnerable cJSON library.

How to confirm the fix worked

Verify installed package versions or commit hashes against the fixed revisions; fuzz JSON inputs containing non-hex characters through the parse_string path and confirm absence of crashes or memory corruption under address sanitizers.

Typical attack path

  1. Identify a service or endpoint that accepts JSON input processed by cJSON
  2. Send a crafted JSON string containing a non-hex character in a quoted value
  3. Trigger the buffer overflow in parse_string leading to crash or RCE
  4. Escalate privileges or persist on the compromised host if code execution succeeds

How to detect it

Review application logs for sudden crashes or segmentation faults in processes using cJSON; inspect network traffic for anomalous JSON payloads with non-standard characters in string fields; correlate with heap-corruption indicators in crash dumps or sanitizer reports.

What your security team should do

  • Immediately upgrade all listed affected packages to the provided fixed commits or versions
  • Scan container images and dependency graphs for embedded cJSON copies and rebuild them
  • Add JSON schema validation or input sanitization at application entry points until patches are deployed
  • Monitor for new exploit releases given the ExploitAvailable maturity and decade-old publication

The record

The parse_string function in cjson.c in the cJSON library mishandles UTF8/16 strings, which allows remote attackers to cause a denial of service (crash) or execute arbitrary code via a non-hex character in a JSON string, which triggers a heap-based buffer overflow.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 iperf3 0 3.1.3-1
Debian:12 iperf3 0 3.1.3-1
Debian:13 iperf3 0 3.1.3-1
Debian:14 iperf3 0 3.1.3-1
Debian:8 iperf3 0 3.0.7-1+deb8u1
Mageia:5 iperf 0 3.0.12-1.mga5
SUSE:Package Hub 12 iperf 0 3.1.3-6.1
Ubuntu:18.04:LTS iperf3 0 3.1.3-1
Ubuntu:Pro:16.04:LTS iperf3 0 3.0.11-1ubuntu0.1~esm1
openSUSE:Tumbleweed iperf 0 3.1.3-1.3

Related vulnerabilities