Alpine Linux discloses OpenSSH-server password authentication bypass
Alpine Linux published a security advisory disclosing a password authentication bypass in its OpenSSH-server. The root cause is that musl's crypt() returns the string "*" as an error marker when the key exceeds 256 bytes, while passwordless accounts also store "*" in that field, so the comparison succeeds and login is allowed. The advisory also states the bypass is exploitable as long as at least one local account using a $5$ or $6$ hash exists on the system.
The flaw stems from musl's crypt() returning the string `*` as an error indicator when the key exceeds 256 bytes, while `*` is also exactly the value stored for passwordless accounts, so the comparison matches. By contrast, glibc systems use libxcrypt, which returns `*0` on failure, so the comparison does not pass. Affected is OpenSSH running on musl systems (such as Alpine Linux, OpenWrt and Buildroot), and it requires both an account whose password hash is `*` and an account with a real password hash to exist at the same time; OpenSSH 10.6p2 has worked around the issue in sshd.
Alpine Linux users running sshd need to upgrade to OpenSSH 10.6p2 and restart sshd, because upgrading the package alone will not replace the running daemon. If upgrading is not immediately possible, setting PasswordAuthentication no in the sshd configuration and restarting sshd also closes the vulnerability.
Some commenters questioned why musl chose "*", the same value as the passwordless field in /etc/passwd, as its error marker, and asked whether any other C library does the same. Others argued the advisory's wording understates the risk, since the practical meaning is close to "any other user with a real password" being able to trigger it. Another comment noted that given Alpine's widespread use in the Docker ecosystem, the affected scope may be large.