# CVE-2016-5017: Memory corruption in n/a

> A buffer overflow in the Apache Zookeeper CLI shell allows attackers to cause unspecified impacts, likely code execution or denial of service, via long command strings.

- **Severity:** High 8.1 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Sep 2016
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2016-5017, DLA-630-1, GHSA-85r2-fvq8-6xw9, MGASA-2016-0328, UBUNTU-CVE-2016-5017

## What is CVE-2016-5017?

CVE-2016-5017 is a high-severity memory corruption vulnerability in n/a, published on 21 Sep 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2016-5017?

It affects 1 product.


Products: Apache Zookeeper.

## How do I fix CVE-2016-5017?

Upgrade to a fixed version.

## Is CVE-2016-5017 being exploited?

There is no known exploitation of CVE-2016-5017 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2024-51504](https://insights.sbomify.com/CVE-2024-51504/): Apache ZooKeeper: Authentication bypass with IP-based authentication in Admin Server (critical 9.1)
- [CVE-2023-44981](https://insights.sbomify.com/CVE-2023-44981/): Apache ZooKeeper: Authorization bypass in SASL Quorum Peer Authentication (critical 9.1)
- [CVE-2026-59739](https://insights.sbomify.com/CVE-2026-59739/): Apache ZooKeeper: Information disclosure via SetWatches reconnect replay (high 7.5)
- [CVE-2026-59969](https://insights.sbomify.com/CVE-2026-59969/): Apache ZooKeeper: Improper validation of certificate with host mismatch in FIPS mode (high 7.5)
- [CVE-2026-79993](https://insights.sbomify.com/CVE-2026-79993/): Missing authorization in Apache ZooKeeper (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-5017 and fix it if it is affected.

What it is: CVE-2016-5017 is a high-severity memory corruption vulnerability in n/a, published on 21 Sep 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2016-5017 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2016-5017/ (Markdown: https://insights.sbomify.com/CVE-2016-5017/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2016-5017
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2016-5017
- OSV: https://osv.dev/vulnerability/CVE-2016-5017

---
From sbomify Insights: https://insights.sbomify.com/CVE-2016-5017/
Summaries are generated and may contain mistakes; the official description above is the record.
