Stackmaven
Beat report Published 1d ago ·

A long enough password opens key-only accounts on Alpine's sshd, and the upstream version number will not show who is fixed

OpenSSH 10.6p2 works around a password bypass on musl systems without PAM, including Alpine's default sshd package. Patched Alpine branches keep older upstream versions, a package upgrade does not restart sshd, and neither step shows whether anyone already logged in.

By Stackmaven

An attacker who can reach an SSH port on an affected Alpine system can log in to an account with no password by sending a very long one. OpenSSH shipped a fix on November 5, but the check most teams would reach for first can mislead here. On stable Alpine branches, a patched server stays on an older upstream version, so the package revision is what counts.

How a failure became a match

The bug sits between two reasonable decisions. When sshd runs without PAM, it hashes the submitted password with crypt() and compares the result with the stored field. An account with no password holds a literal * there, a value no real hash should ever equal. To keep timing consistent, sshd borrows another account’s salt for these accounts and hashes the attempt anyway.

musl’s crypt() caps keys at 256 bytes and returns the string * when it fails. So a password of 257 to 1,024 bytes fails, comes back as *, and matches the stored field. OpenSSH describes the root cause as outside sshd, and the oss-security thread is still debating how crypt() should report errors. For operators, the point is simpler: a marker meant to say “no password can work” became the value one specific failure produces.

Which systems are exposed

Alpine’s advisory says all of these must be true:

  • The server runs the openssh-server package, which is built without PAM, or openssh-server-pam with UsePAM no.
  • PasswordAuthentication is yes, the OpenSSH default.
  • An account has * as its password field, which covers key-only users and directory users without a shadow entry.
  • At least one local account has a $5$ or $6$ hash.

That last condition is the easy one to trigger by accident. Alpine notes that a single user with a password makes every account without one reachable. Root also ships as root:*, but the default PermitRootLogin prohibit-password protects it. That helps less when another reachable account can use doas.

Containers that do not run sshd are unaffected, as are locked ! accounts. Outside Alpine, the researcher names OpenWrt, Buildroot, and Yocto as musl platforms, and says glibc, PAM, and Dropbear setups are not affected.

Cloud images are narrower than the first reports

The researcher’s page names Alpine’s AWS and Azure images, and Alpine’s advisory adds the conditions that matter. Images configured through cloud-init are not affected, because cloud-init writes PasswordAuthentication no. The official tiny-cloud images from 3.18.11 through 3.24.3 ship an alpine user with a * field and passwordless doas. They are safe on first boot, then become exploitable once any $6$ hash exists, for example when an admin sets a console password or user-data adds a user with hashed_passwd. From there, a shell as alpine becomes root.

That makes this a configuration-drift problem as much as a base-image one: an instance can become exposed through a routine change that has nothing to do with SSH.

Version checks need more care than usual

The CVE record lists OpenSSH before 10.6p2 as affected, while Alpine backported the fix and kept each branch on its own upstream release:

  • Edge: 10.6_p2-r0
  • 3.24: 10.3_p1-r2
  • 3.23: 10.2_p1-r1
  • 3.22: 10.0_p1-r11
  • 3.21: 9.9_p2-r1

Fixed packages go back to 3.16, past regular support. Teams should compare the revision from apk info -v openssh-server against Alpine’s table, and expect tools keyed to the upstream number to need a manual look.

Two more steps are easy to miss. Upgrading the package does not restart the running daemon, so rc-service sshd restart is part of the fix. For images, an apk add openssh-server layer cached before November 5 keeps the old package until it is rebuilt. Where patching has to wait, PasswordAuthentication no closes the hole, and sshd -T confirms the effective setting.

The patch does not answer the older question

The researcher reports reproducing the bypass on OpenSSH 7.5p1 with a 2017 musl build, so exposure may reach back years. None of the advisories reviewed here reports exploitation in the wild, but the CVE record links public reproduction labs. It scores the flaw 8.1 with high attack complexity, while Alpine says the attack works every time, and NVD has not yet analyzed the record.

Alpine’s guidance is to search /var/log/messages for Accepted password for lines naming an account that has no password, then review doas use, new users, and authorized keys. If a login cannot be ruled out, it says to treat the machine as compromised.

Why this one surfaced now

The finder says agent swarms ran roughly 17,600 odd logins against sshd builds across libc and PAM combinations, and only musl without PAM disagreed. OpenSSH’s release note adds that, in a number of cases, AI-found bugs have been independently rediscovered, which suggests attackers can find them too, so the project will ship fixes more often for now. For teams that treat sshd as a stable corner of the stack, that tempo may be the larger change.

Sources cited
  1. Announce: Portable OpenSSH 10.6p2 released (OpenSSH, oss-security) www.openwall.com
  2. Security advisory: openssh-server password authentication bypass (Alpine Linux) alpinelinux.org
  3. CVE-2026-123158 (NVD) nvd.nist.gov
  4. avoid password authn bypass (OpenSSH fix commit) github.com
  5. *sshole (Özgün Kültekin, Wakefield) sshhole.com
  6. OpenSSH Password Authentication Bypass on Alpine Linux (OX Security) www.ox.security
  7. SSHhole (CVE-2026-123158) and how IONIX is helping you respond (IONIX) www.ionix.io
  8. sshhole-lab, reproduction lab linked from the CVE record (leonjza) github.com
esc