Skip to content

CVE-2026-123158: OpenSSH sshd Authentication Bypass via musl libc ('SSHole')

Density:
C-Level Executive Briefing CVE-2026-123158 CRITICAL SCORE 94/100

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).

HYBRID

HERMES THREAT SCORE & MUSL SSHD AUTHENTICATION INTEGRITY EVALUATION

Target: OpenSSH sshd Password Authentication Path (musl libc / auth-passwd.c)
Confidence: 99%
94 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 19 / 20
Weaponization 19 / 20
Exposure 19 / 20
Prevalence 18 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20
⚖️ Divergence & Operational Rationale

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.

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:

  1. musl fails to allocate internal hashing workspace or encounters internal buffer boundary validation constraints.
  2. crypt() terminates abnormally and returns either a NULL pointer or a static error indicator string (*0).

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 */
int
sys_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, sshd initializes 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:

  1. Running openssh-server built without PAM, or openssh-server-pam configured with UsePAM no.
  2. PasswordAuthentication yes is enabled in sshd_config (the default setting in OpenSSH).
  3. The machine contains an account with a * password field in /etc/shadow (e.g., root:*, key-only accounts created via adduser, or cloud image accounts like alpine).
  4. At least one local user account on the machine has a standard $5$ (SHA-256) or $6$ (SHA-512) password hash.
BranchVulnerable PackagePatched Package VersionStatus
Edgeopenssh < 10.6_p2-r010.6_p2-r0Patched
v3.24openssh < 10.3_p1-r210.3_p1-r2Patched
v3.23openssh < 10.2_p1-r110.2_p1-r1Patched
v3.22openssh < 10.0_p1-r1110.0_p1-r11Patched
v3.21openssh < 9.9_p2-r19.9_p2-r1Patched
v3.20 (EOL)openssh < 9.7_p1-r69.7_p1-r6Patched
v3.19 (EOL)openssh < 9.6_p1-r39.6_p1-r3Patched
v3.18 (EOL)openssh < 9.3_p2-r49.3_p2-r4Patched
v3.17 (EOL)openssh < 9.1_p1-r79.1_p1-r7Patched
v3.16 (EOL)openssh < 9.0_p1-r69.0_p1-r6Patched

4. Threat Intelligence & In-the-Wild Exploitation

Section titled “4. Threat Intelligence & In-the-Wild Exploitation”

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 bytes
2026-11-06T02:14:13Z - SSH_MSG_USERAUTH_SUCCESS: Authentication succeeded for root!
2026-11-06T02:14:14Z - PTY allocated; interactive session opened
2026-11-06T02:14:15Z - T1033 Exec: whoami -> 'root'
2026-11-06T02:14:15Z - T1082 Exec: uname -a; cat /etc/alpine-release; lscpu
2026-11-06T02:14:16Z - Inbound curl/wget staging payload dropped into /tmp/.ssh_update

The 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.

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; \
)

Inspect /var/log/messages or /var/log/auth.log for unexpected password logins for users meant to be key-only:

Terminal window
# Search for password logins on accounts that have no interactive password
grep -E "Accepted password for (root|alpine) from" /var/log/auth.log /var/log/messages

Organizations operating Alpine Linux instances must execute immediate patching or apply configuration mitigations.

  1. Apply Package Updates via APK: Update the repository index and upgrade openssh:

    Terminal window
    apk update && apk upgrade openssh
  2. 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
  3. Emergency Workaround (Disable Password Authentication): If packages cannot be immediately updated, disable password authentication entirely:

    Terminal window
    # Create a high-priority drop-in configuration file
    mkdir -p /etc/ssh/sshd_config.d
    echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf
    # Ensure sshd_config enforces PasswordAuthentication no
    sed -i.bak -e 's/^\(\s*PasswordAuthentication\s*\)yes/\1no/i' /etc/ssh/sshd_config
    # Test syntax and reload daemon
    sshd -t && rc-service sshd restart