Security
Critical OpenSSH Flaw Lets Attackers Bypass Passwordless Accounts on Alpine Linux
An authentication vulnerability in OpenSSH affects systems built with musl C library and no PAM, allowing unauthenticated access to accounts that should require keys only.
InfoQ
Researchers have disclosed a serious authentication bypass vulnerability in OpenSSH that enables unauthenticated attackers to log into accounts configured to accept no passwords. Dubbed *sshole and assigned CVE-2026-123158, the flaw is now being actively exploited in the wild, particularly against Alpine Linux infrastructure.
How the Vulnerability Works#
The bug emerges from an interaction between OpenSSH's authentication logic and the musl C library's handling of cryptographic password verification. When a password exceeding 256 bytes is supplied, musl's crypt() function returns an error marked with an asterisk—the same character that Linux uses in /etc/shadow files to indicate accounts with no usable password. OpenSSH mistakenly interprets this asterisk as a successful hash match, granting login access.
The conditions needed to trigger the flaw are quite specific. The system must be running OpenSSH before version 10.6p2, compiled against musl rather than glibc, and configured without PAM. Additionally, at least one account must have a SHA-256 or SHA-512 password hash, and another account must be marked passwordless. When these conditions align, any password between 257 and 1,024 characters can authenticate against the locked account.
Why Alpine Linux Is Hit Hardest#
Alpine Linux stands out as the primary vulnerable distribution because it uses musl and ships with OpenSSH configured to skip PAM by default. Other musl-based systems—OpenWrt, Buildroot, and Yocto—face similar risk under the same configuration. Systems using glibc, PAM, Dropbear, or OpenBSD remain unaffected.
The implications are particularly severe for Alpine users on cloud platforms. On Alpine's official AWS and Azure images, the default alpine user is passwordless and has passwordless doas access, meaning attackers could pivot directly to root privileges within seconds of gaining shell access.
Root Cause Analysis#
Security researcher Ozgun Kultekin, who disclosed the flaw through sshhole.com, traced the vulnerability to a pair of musl changes from 2012. One alteration replaced crypt()'s NULL error return with an asterisk; another imposed a 256-byte limit on SHA-512 hashing. These changes inadvertently created a value that OpenSSH could confuse for a valid hash.

