CVE-2026-123158: OpenSSH sshd Authentication Bypass via musl libc ('SSHole')
On November 5, 2026, the OpenSSH project released version 10.6p2 to remediate CVE-2026-123158, colloquially named 'SSHole'. The vulnerability represents an architectural return value desynchronization flaw between the musl libc crypt() function and OpenSSH sshd authentication logic when built without PAM. On systems running Alpine Linux or other musl-based distributions where password authentication is permitted, an unauthenticated remote attacker who supplies a password string between 257 and 1024 bytes can authenticate into any account whose shadow password entry is '*' (accounts with passwords disabled or reserved for SSH key authentication, including root by default on Alpine). Exploitation requires a single network connection, succeeds on the first attempt without brute force, and relies solely on the target machine having at least one local user with a standard $5$ or $6$ password hash. Within hours of public disclosure, honeypot telemetry from Previdian confirmed in-the-wild root compromises followed by automated host discovery (T1033, T1082). Hermes evaluates CVE-2026-123158 at HTS 94 (CRITICAL).
HERMES THREAT SCORE & MUSL SSHD AUTHENTICATION INTEGRITY EVALUATION
Target:OpenSSH sshd Password Authentication Path (musl libc / auth-passwd.c) While standard CVSS v3.1 assigns an 8.1 High rating due to the Attack Complexity condition (requiring an account with a '$5$' or '$6$' hash and a '*' account), Hermes rates it at HTS 94 (CRITICAL). Alpine Linux represents the ubiquitous container operating system base image across cloud-native environments (Docker, Kubernetes). In environments where sshd is deployed in containers or lightweight edge appliances, this defect allows direct, instant root takeover over standard SSH port 22 in a single unauthenticated packet exchange.
1. Executive Summary & Architectural Overview
Section titled “1. Executive Summary & Architectural Overview”On November 5, 2026, security researcher Özgün Kültekin (Wakefield) disclosed a severe vulnerability in OpenSSH affecting Linux systems utilizing the musl libc standard C library without Pluggable Authentication Modules (PAM). Tracked as CVE-2026-123158 and designated “SSHole”, the vulnerability allows an unauthenticated remote attacker on the network to bypass password authentication in sshd and achieve instant interactive shell access.
The flaw exists because musl libc handles oversized password buffers in its implementation of crypt() differently than GNU glibc. When a client delivers an authentication password string whose length is between 257 and 1024 bytes, crypt() returns an unexpected error state or NULL buffer. In OpenSSH’s standalone password authentication subsystem (auth-passwd.c), this return value triggers an unintended code path where the computed hash comparison matches against locked or passwordless account entries represented by * in /etc/shadow.
2. Root Cause Analysis & Technical Mechanics (CWE-394)
Section titled “2. Root Cause Analysis & Technical Mechanics (CWE-394)”The vulnerability is classified under CWE-394: Unexpected Status Code or Return Value and CWE-287: Improper Authentication.
The musl libc crypt() Anomaly
Section titled “The musl libc crypt() Anomaly”Standard UNIX authentication relies on the POSIX crypt(key, salt) function. Under GNU C Library (glibc), passwords of arbitrary length are processed or truncated gracefully according to the hash algorithm (e.g., standard $6$ SHA-512 crypt processes the initial bytes or truncates beyond algorithm limits).
In musl libc, internal buffer allocations in crypt() for SHA-256 ($5$) and SHA-512 ($6$) routines assume input key lengths compliant with typical interactive typing. When an incoming password length falls strictly within the interval 257 <= len <= 1024 bytes:
muslfails to allocate internal hashing workspace or encounters internal buffer boundary validation constraints.crypt()terminates abnormally and returns either a NULL pointer or a static error indicator string (*0).
OpenSSH Fallback Logic Desynchronization
Section titled “OpenSSH Fallback Logic Desynchronization”In sshd, when PAM is disabled (--without-pam at compile time, or UsePAM no at runtime), password verification is handled by sys_auth_passwd() in auth-passwd.c:
/* OpenSSH auth-passwd.c - Vulnerable Fallback Logic */intsys_auth_passwd(struct ssh *ssh, const char *password){ struct passwd *pw = authctxt->pw; char *encrypted_password, *salt;
/* Retrieve hash from /etc/shadow */ salt = pw->pw_passwd;
/* If account is locked/key-only, salt is "*" */ encrypted_password = xcrypt(password, salt);
/* CWE-394: Failure to validate error return code from musl crypt() */ if (encrypted_password == NULL || strcmp(encrypted_password, salt) == 0) { /* Under musl, xcrypt() failure matches the salt representation of disabled accounts! */ return 1; /* AUTHENTICATION GRANTED! */ } return 0;}When an account in /etc/shadow has * as its password field (which is the standard security convention for accounts that have no interactive password and should only authenticate via SSH public keys, such as root:* in Alpine base images):
- If the machine hosts at least one other user account possessing a valid
$5$or$6$shadow password hash,sshdinitializes the shadow verification context. - When the attacker transmits a 257-byte to 1024-byte password for the
*account,xcrypt()returns the error representation. - The condition evaluates as a successful match, granting the attacker interactive access as that user without ever verifying a valid password!
3. Vulnerability Matrix & Affected Linux Distributions
Section titled “3. Vulnerability Matrix & Affected Linux Distributions”The defect affects systems meeting all of the following conditions:
- Running
openssh-serverbuilt without PAM, oropenssh-server-pamconfigured withUsePAM no. PasswordAuthentication yesis enabled insshd_config(the default setting in OpenSSH).- The machine contains an account with a
*password field in/etc/shadow(e.g.,root:*, key-only accounts created viaadduser, or cloud image accounts likealpine). - At least one local user account on the machine has a standard
$5$(SHA-256) or$6$(SHA-512) password hash.
Alpine Linux Release Matrix
Section titled “Alpine Linux Release Matrix”| Branch | Vulnerable Package | Patched Package Version | Status |
|---|---|---|---|
| Edge | openssh < 10.6_p2-r0 | 10.6_p2-r0 | Patched |
| v3.24 | openssh < 10.3_p1-r2 | 10.3_p1-r2 | Patched |
| v3.23 | openssh < 10.2_p1-r1 | 10.2_p1-r1 | Patched |
| v3.22 | openssh < 10.0_p1-r11 | 10.0_p1-r11 | Patched |
| v3.21 | openssh < 9.9_p2-r1 | 9.9_p2-r1 | Patched |
| v3.20 (EOL) | openssh < 9.7_p1-r6 | 9.7_p1-r6 | Patched |
| v3.19 (EOL) | openssh < 9.6_p1-r3 | 9.6_p1-r3 | Patched |
| v3.18 (EOL) | openssh < 9.3_p2-r4 | 9.3_p2-r4 | Patched |
| v3.17 (EOL) | openssh < 9.1_p1-r7 | 9.1_p1-r7 | Patched |
| v3.16 (EOL) | openssh < 9.0_p1-r6 | 9.0_p1-r6 | Patched |
4. Threat Intelligence & In-the-Wild Exploitation
Section titled “4. Threat Intelligence & In-the-Wild Exploitation”Honeypot & Incident Response Telemetry
Section titled “Honeypot & Incident Response Telemetry”Shortly after the advisory release, threat monitoring sensors observed automated exploitation scripts scanning IPv4 address space for Alpine SSH banners (OpenSSH_... Alpine).
[ATTACK TIMELINE: PREVIDIAN HONEYPOT LOGS]2026-11-06T02:14:12Z - INBOUND TCP connection from 185.220.101[.]5:49182 -> SSH (port 22)2026-11-06T02:14:13Z - SSH_MSG_USERAUTH_REQUEST: user='root', method='password', length=512 bytes2026-11-06T02:14:13Z - SSH_MSG_USERAUTH_SUCCESS: Authentication succeeded for root!2026-11-06T02:14:14Z - PTY allocated; interactive session opened2026-11-06T02:14:15Z - T1033 Exec: whoami -> 'root'2026-11-06T02:14:15Z - T1082 Exec: uname -a; cat /etc/alpine-release; lscpu2026-11-06T02:14:16Z - Inbound curl/wget staging payload dropped into /tmp/.ssh_updateThe attack exhibits deterministic 100% reliability on affected hosts on the very first packet exchange without triggering rate limiting or brute-force lockouts.
5. Detection Engineering, Auditd & Forensics
Section titled “5. Detection Engineering, Auditd & Forensics”Security teams should immediately search SSH authentication logs and deploy network detection rules.
Suricata / Snort Rule
Section titled “Suricata / Snort Rule”alert ssh any any -> $HOME_NET 22 ( \ msg:"HERMES - OpenSSH musl libc Authentication Bypass Attempt (CVE-2026-123158 SSHole)"; \ flow:to_server,established; \ content:"SSH-2.0-"; depth:8; \ byte_test:4,>,256,0,relative; \ threshold:type limit, track by_src, count 1, seconds 60; \ classtype:attempted-admin; \ sid:202612315; rev:1; \)Auditd & Log Signatures
Section titled “Auditd & Log Signatures”Inspect /var/log/messages or /var/log/auth.log for unexpected password logins for users meant to be key-only:
# Search for password logins on accounts that have no interactive passwordgrep -E "Accepted password for (root|alpine) from" /var/log/auth.log /var/log/messages6. Remediation, Patching & Hardening
Section titled “6. Remediation, Patching & Hardening”Organizations operating Alpine Linux instances must execute immediate patching or apply configuration mitigations.
-
Apply Package Updates via APK: Update the repository index and upgrade
openssh:Terminal window apk update && apk upgrade openssh -
Crucial: Restart sshd Daemon: Upgrading the package alone on Alpine does NOT automatically restart the running daemon. You must restart the service:
Terminal window rc-service sshd restart -
Emergency Workaround (Disable Password Authentication): If packages cannot be immediately updated, disable password authentication entirely:
Terminal window # Create a high-priority drop-in configuration filemkdir -p /etc/ssh/sshd_config.decho "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf# Ensure sshd_config enforces PasswordAuthentication nosed -i.bak -e 's/^\(\s*PasswordAuthentication\s*\)yes/\1no/i' /etc/ssh/sshd_config# Test syntax and reload daemonsshd -t && rc-service sshd restart