OpenSSH auth bypass on Alpine: five sound decisions, one broken seam
An OpenSSH auth bypass on Alpine, assembled from five individually reasonable decisions made between 1980 and 2022.
CVE-2026-123158, disclosed November 5. On musl libc, crypt() returns "*" when a SHA-256 or SHA-512 hash is longer than 256 bytes, and key-only accounts also store "*" in /etc/shadow. OpenSSH compares the strings, they match, login succeeds. Any ~300 characters work as the password.
The chain: UNIX picks "*" to disable password login (1980). musl returns "*" on crypt() errors, then caps password length at 256 (2012). OpenSSH adds a fake salt to stop timing-based username enumeration (2016). Alpine switches root to "*" for key-only cloud images (2022).
All of these must hold:
- musl system: Alpine, OpenWrt, Buildroot, Yocto
- sshd without PAM, or UsePAM no
- PasswordAuthentication yes, the default
- an account with "*" in /etc/shadow
Check: sshd -T | grep -E "passwordauthentication|usepam". Fix: upgrade to OpenSSH 10.6p2 and restart sshd, or set PasswordAuthentication no and KbdInteractiveAuthentication no, then audit shadow and authorized_keys for keys you did not add.
Not affected: glibc distros like Debian, Ubuntu and RHEL, PAM-based setups, and Alpine Docker containers, which rarely run sshd. Root is usually safe: PermitRootLogin defaults to prohibit-password.
Exploitation attempts appeared within 9 hours of disclosure, though no attacks were confirmed. Patch first.
Every decision was locally correct. The failure lives in the seams between components, so aim review and integration tests there.
Sources
- https://www.bleepingcomputer.com/news/security/openssh-flaw-lets-attackers-log-into-password-disabled-linux-accounts/
- https://www.helpnetsecurity.com/2026/11/06/openssh-sshole-cve-2026-123158-exploitation/
- https://www.tomshardware.com/tech-industry/cyber-security/combined-flaws-let-anyone-into-alpine-linux-and-other-distros-by-typing-anything-over-256-characters-as-a-password-emergency-fixes-for-openssh-and-musl-libc-issued-for-millions-of-systems-patch-immediately
- https://cycode.com/blog/sshole-cve-2026-123158-openssh-alpine-linux-vulnerability/