Alpine Linux has released fixes for an OpenSSH authentication bypass that lets an attacker log in to vulnerable servers with a single connection, according to the project's security advisory. The flaw is tracked as CVE-2026-123158. The advisory says the attack "works every time, and needs no retries."
The problem affects systems that use the musl C library and the default openssh-server package without PAM, with PasswordAuthentication enabled. According to the advisory, an attacker can log in to accounts that have no password or are key-only by sending a password between 257 and 1,024 bytes long. The report says that when a key is longer than 256 bytes, musl's crypt() returns "*" as an error indicator, which matches the stored password field of passwordless accounts.
Alpine said every release it checked is affected, including versions 3.21 through 3.24, edge, and the older 3.16 to 3.20 branches. It singled out its tiny-cloud images from versions 3.18.11 through 3.24.3 as especially vulnerable. The report says other musl-based systems, including Adélie Linux, Void Linux, Sabotage Linux, OpenWrt, and the Yocto Project, are potentially vulnerable. Wind River said it is reviewing the issue. The report states that glibc-based distributions such as Debian, Ubuntu, and Fedora are not affected.
Alpine released fixed versions 3.21.10, 3.22.8, 3.23.8, and 3.24.4 on Thursday, and published fixed packages back to 3.16. The OpenSSH 10.6p2 release avoids the problem in sshd. Alpine advises running apk upgrade -U -a and then restarting sshd with rc-service sshd restart, because upgrading the package does not replace the running daemon. Administrators who cannot update should set PasswordAuthentication no and restart sshd after confirming that key login works.
Alpine also advises checking /var/log/messages for "Accepted password for" entries naming accounts without passwords, and reviewing doas use, recently created users, files, and authorized keys. Alpine said that if a login cannot be ruled out, administrators should treat the machine as compromised.