Cloudanix VulnDB

CVE-2016-5017

High · 8.1

CVSS

8.1

EPSS

6.8%

Published

Sep 21, 2016

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older command-line tool used by certain monitoring components could let attackers run their own code on the affected system if they send a specially crafted long command.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Remote Code Execution
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Buffer overflow in the C CLI shell when processing long command strings supplied via the "cmd:" batch mode syntax, allowing memory corruption that can lead to arbitrary code execution or crashes.

Why it matters to the business

Potential remote compromise of Zookeeper deployments or dependent services such as prometheus-pushgateway instances, enabling attackers to disrupt monitoring pipelines or gain unauthorized access with no public ransomware usage but available exploits.

How an attack unfolds

An attacker crafts an excessively long command string and submits it to the vulnerable C CLI shell using the "cmd:" batch mode syntax over the network; the overflow corrupts memory structures, allowing control-flow hijacking to execute attacker-supplied code.

How to fix it

Upgrade affected Zookeeper installations to 3.4.9 or 3.5.3 and later; for prometheus-pushgateway (Chainguard), prometheus-pushgateway (Wolfi), prometheus-pushgateway-bitnami-compat (Chainguard), and prometheus-pushgateway-bitnami-compat (Wolfi) ensure the package is at the fixed version 0 or later and rebuild any dependent images.

How to confirm the fix worked

Verify Zookeeper version is at least 3.4.9 or 3.5.3; confirm prometheus-pushgateway packages report version 0 or higher via package manager queries and test CLI batch mode with oversized commands to ensure no crash occurs.

Typical attack path

  1. Identify exposed Zookeeper CLI interface accepting batch commands
  2. Craft and transmit a long command string via "cmd:" syntax
  3. Trigger buffer overflow to corrupt memory and redirect execution
  4. Execute payload to establish persistence or exfiltrate data

How to detect it

Review CLI access logs and process crash dumps for unusually long command strings; inspect network traffic to the CLI port for oversized payloads; check for unexpected child processes spawned from the Zookeeper CLI binary.

What your security team should do

  • Immediately audit all Zookeeper and prometheus-pushgateway deployments for vulnerable versions
  • Prioritize patching to the listed fixed versions given the public exploit availability
  • Disable or restrict access to the CLI shell batch mode where feasible
  • Monitor for unusual command lengths or CLI process crashes in logs

The record

Buffer overflow in the C cli shell in Apache Zookeeper before 3.4.9 and 3.5.x before 3.5.3, when using the "cmd:" batch mode syntax, allows attackers to have unspecified impact via a long command string.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 zookeeper 0 3.4.9-1
Debian:12 zookeeper 0 3.4.9-1
Debian:13 zookeeper 0 3.4.9-1
Debian:14 zookeeper 0 3.4.9-1
Debian:7 zookeeper 0 3.3.5+dfsg1-2+deb7u1
Mageia:5 zookeeper 0 3.4.5-25.1.mga5
Ubuntu:Pro:14.04:LTS zookeeper 0 3.4.5+dfsg-1ubuntu0.1~esm1
Ubuntu:Pro:16.04:LTS zookeeper 0 3.4.8-1ubuntu0.1~esm1

Related vulnerabilities