CVE-2016-8704
Critical · 9.8CVSS
9.8
EPSS
23.2%
Published
Jan 6, 2017
CISA due date
—
Cloudanix analysis
A flaw in a widely used memory caching system lets attackers take over servers across the network by sending specially crafted commands.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Network Service
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow in process_bin_append_prepend during Memcached binary protocol handling leads to heap overflow and remote code execution.
Why it matters to the business
Remote attackers can seize control of caching servers, exposing stored data, disrupting services, and enabling further network compromise; stable exploit availability and downstream package usage increase urgency for affected deployments.
How an attack unfolds
An attacker crafts oversized or malformed binary append or prepend commands that trigger the integer overflow in process_bin_append_prepend, corrupting heap memory and achieving arbitrary code execution on the Memcached server.
How to fix it
Upgrade affected packages to the fixed versions: cluster-autoscaler-fips-1.29 (Chainguard) to 1.29.3-r1 and cluster-autoscaler-fips-1.29-compat (Chainguard) to 1.29.3-r1; apply vendor patches for Memcached that correct the integer overflow in binary command processing.
How to confirm the fix worked
Confirm Memcached version is updated to a fixed release; test binary protocol handling with malformed append/prepend commands in a lab environment to verify absence of overflow; review package manifests for the listed fixed versions.
Typical attack path
- Identify exposed Memcached instance listening on binary protocol port
- Send crafted binary append/prepend packets that overflow the integer calculation
- Trigger heap overflow to overwrite memory structures
- Inject and execute attacker-controlled code
How to detect it
Review Memcached process logs and network traffic captures for anomalous binary protocol commands; inspect for unexpected child processes or memory corruption indicators post-connection; correlate with exploit maturity indicators.
What your security team should do
- Immediately upgrade the specified Chainguard packages to 1.29.3-r1 or later
- Disable binary protocol support if not required
- Restrict network access to Memcached instances
- Monitor for new exploit releases given the available maturity rating
The record
An integer overflow in the process_bin_append_prepend function in Memcached, which is responsible for processing multiple commands of Memcached binary protocol, can be abused to cause heap overflow and lead to remote code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.4 | memcached | 0 | 1.4.33-r0 |
| Alpine:v3.5 | memcached | 0 | 1.4.33-r0 |
| Debian:11 | memcached | 0 | 1.4.33-1 |
| Debian:12 | memcached | 0 | 1.4.33-1 |
| Debian:13 | memcached | 0 | 1.4.33-1 |
| Debian:14 | memcached | 0 | 1.4.33-1 |
| Debian:7 | memcached | 0 | 1.4.13-0.2+deb7u2 |
| Debian:8 | memcached | 0 | 1.4.21-1.1+deb8u1 |
| Mageia:5 | memcached | 0 | 1.4.25-1.mga5 |
| Red Hat:enterprise_linux:6::client | memcached | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::client | memcached-debuginfo | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::client | memcached-devel | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | memcached | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | memcached-debuginfo | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | memcached-devel | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::server | memcached | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::server | memcached-debuginfo | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::server | memcached-devel | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | memcached | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | memcached-debuginfo | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | memcached-devel | 0 | 0:1.4.4-3.el6_8.1 |
| Red Hat:enterprise_linux:7::client | memcached | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::client | memcached-debuginfo | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::client | memcached-devel | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | memcached | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | memcached-debuginfo | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | memcached-devel | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::server | memcached | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::server | memcached-debuginfo | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::server | memcached-devel | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | memcached | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | memcached-debuginfo | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | memcached-devel | 0 | 0:1.4.15-10.el7_3.1 |
| Red Hat:mobile_application_platform:4.2 | rhmap-fh-openshift-templates | 0 | 0:1.0.0-5.el7 |
| SUSE:Enterprise Storage 4 | memcached | 0 | 1.4.39-3.3.2 |
| SUSE:OpenStack Cloud 6 | memcached | 0 | 1.4.39-3.3.1 |
| SUSE:OpenStack Cloud 7 | memcached | 0 | 1.4.39-3.3.2 |
| Ubuntu:14.04:LTS | memcached | 0 | 1.4.14-0ubuntu9.1 |
| Ubuntu:16.04:LTS | memcached | 0 | 1.4.25-2ubuntu1.2 |
| openSUSE:Tumbleweed | memcached | 0 | 1.4.33-1.1 |
Related vulnerabilities
- CVE-2017-9951 The try_read_command function in memcached.c in memcached before 1.4.39 allows remote… Also affects memcached
- CVE-2016-8706 An integer overflow in process_bin_sasl_auth function in Memcached, which is responsible… Also affects memcached
- CVE-2016-8705 Multiple integer overflows in process_bin_update function in Memcached, which is… Also affects memcached
- CVE-2011-4971 Multiple integer signedness errors in the (1) process_bin_sasl_auth, (2)… Also affects memcached
- CVE-2010-1152 memcached.c in memcached before 1.4.3 allows remote attackers to cause a denial of… Also affects memcached
- CVE-2019-0201 An issue is present in Apache ZooKeeper 1.0.0 to 3.4.13 and 3.5.0-alpha to 3.5.4-beta. Also affects memcached
- CVE-2026-47784 In memcached before 1.6.42, password data for SASL password database authentication has a… Also affects memcached
- CVE-2026-47783 In memcached before 1.6.42, username data for SASL password database authentication has a… Also affects memcached