CVE-2016-8858
High · 7.5CVSS
7.5
EPSS
29.5%
Published
Dec 9, 2016
CISA due date
—
Cloudanix analysis
Attackers can flood an SSH server with repeated setup messages until it runs out of memory and stops working, blocking remote access until the server is fixed or restarted.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Trivial
- Impact
- Denial Of Service
- Component
- Network Service
- Class
- Denial of service
- Remediation
- Other
- Effort
- Medium
- Patch risk
- Low
What it actually does
The kex_input_kexinit function in kex.c fails to properly limit or deduplicate incoming KEXINIT messages, allowing unbounded allocation of memory structures for each duplicate request received over a network connection.
Why it matters to the business
Successful exploitation can render SSH services unavailable, interrupting remote administration, automated deployments, and any dependent business processes until the affected systems are restarted or the attack traffic stops.
How an attack unfolds
An attacker establishes a TCP connection to an exposed OpenSSH server and repeatedly transmits identical KEXINIT packets during the key exchange phase; the server allocates memory for each packet without rate limiting or deduplication, eventually exhausting available memory and causing the daemon to become unresponsive or crash.
How to fix it
Upgrade OpenSSH portable to a build containing commit ec165c392ca54317dbe3064a8c200de6531e89ad or later; if a packaged update is unavailable, apply vendor patches or recompile from a current upstream release that includes the fix.
How to confirm the fix worked
Verify the installed OpenSSH version or commit history contains ec165c392ca54317dbe3064a8c200de6531e89ad; test by attempting to trigger the condition in a lab environment and confirm memory usage remains bounded.
Typical attack path
- Scan for reachable OpenSSH instances listening on TCP port 22
- Open multiple TCP connections and send repeated duplicate KEXINIT messages
- Continue sending until server memory is exhausted and SSH daemon stops responding
- Maintain or repeat the traffic to prolong denial of service
How to detect it
Inspect sshd logs and system resource metrics for sudden spikes in memory usage correlated with high volumes of connection attempts or KEXINIT packets; correlate with network flow data showing many short-lived connections from single sources.
What your security team should do
- Prioritize patching all internet-facing and internal OpenSSH instances to a fixed version
- Restrict SSH exposure using network ACLs or VPNs where immediate patching is delayed
- Monitor SSH daemon resource usage and restart unresponsive instances as a temporary control
- Review and harden sshd_config rate-limiting and MaxStartups settings to reduce attack surface
The record
The kex_input_kexinit function in kex.c in OpenSSH 6.x and 7.x through 7.3 allows remote attackers to cause a denial of service (memory consumption) by sending many duplicate KEXINIT requests. NOTE: a third party reports that "OpenSSH upstream does not consider this as a security issue."
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | openssh | 0 | 1:7.3p1-2 |
| Debian:12 | openssh | 0 | 1:7.3p1-2 |
| Debian:13 | openssh | 0 | 1:7.3p1-2 |
| Debian:14 | openssh | 0 | 1:7.3p1-2 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | openssh | 0 | 7.2p2-66.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | openssh-askpass-gnome | 0 | 7.2p2-66.3 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh | 0 | 6.6p1-35.1 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-35.4 |
| SUSE:Linux Enterprise Server 11-SECURITY | openssh-openssl1 | 0 | 6.6p1-18.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server 12 SP2 | openssh | 0 | 7.2p2-66.1 |
| SUSE:Linux Enterprise Server 12 SP2 | openssh-askpass-gnome | 0 | 7.2p2-66.3 |
| SUSE:Linux Enterprise Server 12-LTSS | openssh | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server 12-LTSS | openssh-askpass-gnome | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | openssh | 0 | 7.2p2-66.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | openssh-askpass-gnome | 0 | 7.2p2-66.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh | 0 | 6.6p1-35.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-35.4 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh-askpass-gnome | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-54.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | openssh | 0 | 7.2p2-66.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | openssh-askpass-gnome | 0 | 7.2p2-66.3 |
| SUSE:Manager 2.1 | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:Manager 2.1 | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| SUSE:Manager Proxy 2.1 | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:Manager Proxy 2.1 | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| SUSE:OpenStack Cloud 5 | openssh | 0 | 6.2p2-0.40.1 |
| SUSE:OpenStack Cloud 5 | openssh-askpass-gnome | 0 | 6.2p2-0.40.3 |
| Ubuntu:Pro:14.04:LTS | openssh | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | openssh | 0 | No fix |
| openSUSE:Tumbleweed | openssh | 0 | 8.4p1-7.4 |
Related vulnerabilities
- CVE-2025-32728 In sshd in OpenSSH before 10.0, the DisableForwarding directive does not adhere to the… Also affects openssh
- CVE-2025-26465 A vulnerability was found in OpenSSH when the VerifyHostKeyDNS option is enabled. Also affects openssh
- CVE-2023-51767 OpenSSH through 10.0, when common types of DRAM are used, might allow row hammer attacks… Also affects openssh
- CVE-2023-51385 In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host… Also affects openssh
- CVE-2021-36368 An issue was discovered in OpenSSH before 8.9. Also affects openssh
- CVE-2021-41617 sshd in OpenSSH 6.2 through 8.x before 8.8, when certain non-default configurations are… Also affects openssh
- CVE-2016-20012 OpenSSH through 8.7 allows remote attackers, who have a suspicion that a certain… Also affects openssh
- CVE-2019-6109 An issue was discovered in OpenSSH 7.9. Also affects openssh