Alpine Linux and OpenSSH patch flaw that’s as bad as it can get

Alpine Linux published security releases on Thursday — versions 3.21.10, 3.22.8, 3.23.8 and 3.24.4 — carrying a fix for an OpenSSH authentication bypass tracked as CVE-2026-123158. Fixed packages were also issued for every release back to 3.16, including the 3.21 branch, which reached end of support on November 1. The flaw was reported by a group calling itself *sshole, and Alpine's advisory describes the worst case bluntly: an attacker who can reach a vulnerable server's SSH port gets in with one connection, and the attack works every time without retries.
The root cause is narrow. When OpenSSH is compiled without Pluggable Authentication Modules (PAM), it checks a password by running the attempt through the C library's crypt() function and comparing the result with the account's stored password field. On musl, the lightweight libc Alpine uses in place of glibc, crypt() returns the single-character string * when the input is longer than 256 bytes. That same * is what sits in the password field of accounts with no password at all, such as key-only accounts. The comparison succeeds, and the login is granted.
Exploitation needs a specific combination: the openssh-server package built without PAM (or openssh-server-pam with UsePAM set to no), PasswordAuthentication left at its default of yes, at least one account whose password field is *, and at least one other account on the machine carrying a $5 or $6 hash. The attacker also needs to know the name of the passwordless account and must send a password between 257 and 1,024 bytes long. According to Alpine, one user with a real password is enough to make every passwordless account reachable.
Alpine says every release it checked is affected: 3.21 through 3.24, edge, and the older 3.16 through 3.20 branches. Other musl-based systems are potentially exposed — Adélie Linux, Void Linux, Sabotage Linux, OpenWrt, an Android variant, and the Yocto Project used to build embedded distributions. Wind River, which sells the commercial Wind River Linux, told ZDNET it is actively reviewing the reported vulnerability and assessing its impact, and will act as needed. Distributions built on glibc, which covers Debian, Ubuntu and Fedora, are not affected: glibc's crypt() returns NULL on the same input and sshd already rejects that.
Root is mostly shielded. Alpine has shipped root with a * password field in its base image since roughly 3.16, but OpenSSH's default PermitRootLogin prohibit-password blocks direct root logins. The practical danger is an ordinary account that can escalate, for example through doas, which hands the attacker a path to root anyway. Alpine singled out its official tiny-cloud images, versions 3.18.11 through 3.24.3, as especially exposed: they include an alpine user with a * password field and passwordless doas. They are safe on first boot but become exploitable as soon as any $6 hash appears on the host, which can happen when an administrator sets a console password or when user data creates a user with a hashed password.
Alpine lists several configurations as not affected: containers that do not run sshd, systems with password authentication turned off, systems running openssh-server-pam with UsePAM yes, locked accounts whose password field begins with !, and cloud images configured through cloud-init, which writes PasswordAuthentication no.
The fix ships in the new Alpine packages and upstream in OpenSSH 10.6p2, which avoids the problem in sshd. Administrators should run apk upgrade -U -a and then restart the daemon with rc-service sshd restart; Alpine stressed that upgrading the package does not replace the running process. Those who cannot update right away should set PasswordAuthentication no and restart sshd, after confirming that key-based login still works.
To look for signs of compromise, Alpine advises searching /var/log/messages for "Accepted password for" entries naming an account that has no password, and reviewing doas usage plus recently created users, files and authorized keys. Its guidance is that if a login cannot be ruled out, the machine should be treated as compromised. The reporter's account of the bug describes it as a side effect that has been present since 2016.
The incident follows closely on Alpine's rebuild of its GitLab server after a separate close call. For a distribution whose appeal rests on being small and simple, the pattern is uncomfortable: both problems lived in widely reused plumbing rather than in Alpine's own code. A likely trade-off is that musl's decision to return a sentinel string instead of NULL on error traded a checkable failure for an ambiguous value — sensible in isolation, dangerous when it meets a caller that treats * as data.
This suggests administrators of embedded and container images should inventory where passwordless accounts coexist with password-enabled SSH, since those builds are often shipped with defaults nobody revisits. Open questions include how quickly downstream musl distributions and Yocto-based vendors backport the fix, and whether build tooling should refuse configurations that mix key-only accounts with PasswordAuthentication yes.
Why it matters: Anyone running Alpine, OpenWrt, Yocto-built images or other musl systems with OpenSSH and password authentication enabled faces a bypass that needs no credentials beyond an account name, so patching and restarting sshd is urgent rather than routine. Developers who maintain container or embedded base images should check whether their defaults create the * plus $6 hash combination, and product teams shipping such images may need to push updated builds. In my reading, the lasting lesson is that security depends on how library error conventions line up across components, not just on each component's own correctness.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
This dangerous Linux security hole must be patched as soon as possible.