SSHole: a 257-byte password is the key

SSHole: a 257-byte password is the key

CVE-2026-123158, nicknamed SSHole by its finder, is the kind of bug that looks impossible until you see where it comes from. Send sshd a password longer than 256 bytes and, on the right kind of system, it logs you in as an account that has no password at all. One connection, no retries, no credential needed.

OpenSSH shipped the fix in 10.6p2 on 5 November 2026, and Alpine Linux patched every branch the same day. Previdian reported its first observed exploitation attempt less than nine hours after the CVE was published, and confirmed successful root access on a honeypot running real Alpine and real OpenSSH.

Before the panic sets in: this is not every SSH server on the internet. Four conditions have to line up, and most Linux fleets fail the first one. But the systems that do match are exactly the ones nobody has an inventory of — container images, appliance firmware, tiny cloud instances — which is why "we run Debian" is not the end of the question.

One character, two meanings

The flaw is a collision between two reasonable decisions made years apart.

In 2016, to close a username-enumeration timing flaw (CVE-2016-6210), OpenSSH changed sshd so that when an account has no usable password hash, it borrows another account's salt and hashes the supplied password anyway, so that the timing looks identical either way.

Since 2012, musl's crypt() has refused SHA-256 and SHA-512 keys longer than 256 bytes — and signals that failure by returning the string *. Glibc returns NULL in the same situation, which sshd already treats as a failure.

On Alpine, is also what /etc/shadow stores for an account that has no password set. So sshd takes musl's error marker, compares it to the stored field, finds equal to *, and accepts the login. The flaw is classed as CWE-394, unexpected status code or return value, and MITRE rates it CVSS 3.1 8.1.

OpenSSH's position is that the root cause lives outside sshd, but since it is reachable through sshd, sshd now blocks it: the fix in auth-passwd.c rejects any stored hash shorter than four characters. The researcher, Özgün Kültekin, traces the behaviour back a decade.

The four conditions

A host is exploitable only when all of these hold, per Alpine's own advisory:

  • sshd runs against musl libc and is built without PAM, or with UsePAM no. Alpine's default openssh-server package is built exactly that way.
  • PasswordAuthentication is enabled — which is the OpenSSH default.
  • Some account's shadow field is exactly *. Accounts locked with ! are safe.
  • At least one other local account carries a $5$ or $6$ password hash, because that is the salt sshd borrows to run the comparison.

Glibc distributions — Debian, Ubuntu, Fedora, RHEL — are not affected. Neither is anything authenticating through PAM, nor Dropbear, nor OpenBSD.

Which accounts fit the * description? Key-only deploy users created without a password. Service accounts. Directory users pulled in through musl-nscd. And on Alpine's official cloud images, the default alpine user, which also has passwordless doas — so reaching it is reaching root. SOCRadar lists the affected tiny-cloud images as versions 3.18.11 through 3.24.3.

Alpine's root has carried a * since roughly 3.16, but the default PermitRootLogin prohibit-password keeps it out of direct reach unless somebody changed that setting. Indirect root, through an account like alpine, is the realistic path.

Beyond Alpine, the researcher names OpenWrt, Buildroot and Yocto as musl-based systems worth checking — along with, in his words, a lot of the Docker images you have already pulled. A container is only at risk if it actually runs sshd with password logins enabled, which is uncommon in a well-built image and depressingly common in images built to be convenient.

Checking a host in two commands

On any musl-based machine, list the accounts with an empty-password marker, then the accounts with a real hash:

awk -F: '$2=="*"{print $1}' /etc/shadow

awk -F: '$2 ~ /^\$[56]\$/{print $1}' /etc/shadow

If both commands print something and password authentication is on, that host was exploitable.

Do not rely on the version banner. Alpine's fixed packages keep their original upstream version numbers — 3.24 is fixed at 10.3_p1-r2, 3.20 at 9.7_p1-r6, 3.16 at 9.0_p1-r6 — so a scanner comparing against "10.6p2" will report patched Alpine hosts as vulnerable, and may do the reverse on systems it cannot fingerprint properly. Check the apk package revision, or check how the server behaves.

The patch that does nothing

This is the part that will catch people a week from now.

apk update && apk upgrade installs the fixed binary. It does not restart the running daemon. The sshd process that is currently accepting connections keeps executing the old code until it is restarted — rc-service sshd restart on Alpine. A fleet that reports "patched" on every host and was never restarted is a fleet that is still fully exploitable, with a dashboard saying otherwise.

If a restart has to wait for a maintenance window, turn password authentication off instead, which closes the flaw immediately. Keep a key-based session open while you do it: create /etc/ssh/sshd_config.d/00-no-passwords.conf containing PasswordAuthentication no, validate with sshd -t, restart, and confirm with sshd -T | grep -i passwordauthentication. OpenSSH's Damien Miller put it bluntly on the day — anyone running musl-based Linux without PAM should set this immediately.

Checking whether someone already used it

Exploitation started within hours, so on an exposed host the question is not only whether it is patched now.

Search /var/log/messages for Accepted password for entries naming an account that has no password — alpine, root, a key-only service user. Any such line is a successful exploitation, not an anomaly to weigh up. Then review doas usage, newly created users, changed files and authorized_keys entries on that host. If you cannot rule a login out, treat the machine as compromised and rebuild it.

Previdian's sensors recorded eight attempts, all from a single Japan-based address, 89.116.89[.]18, running id, uname and hostname through non-interactive sessions — reconnaissance, establishing what the box is before deciding what to do with it. That is one sensor's view of the first days, not a measure of the campaign. No broader network indicators have been published, and the flaw is on Previdian's own exploited list but not in CISA's KEV catalogue. Public proof-of-concept code is circulating on GitHub; Previdian cautions that it is unverified and may itself be malicious.

Why this one is worth a sweep

The patching story here is simple. The inventory story is not.

Nobody maintains a list of which of their internet-facing hosts are musl-based, because until 5 November that distinction did not matter to anyone outside a build team. The exposed population is made of things that got deployed and forgotten: a minimal Alpine container someone gave an SSH port for debugging, a Buildroot appliance in a branch office, an Alpine cloud instance spun up for one job two years ago and still running with its default user.

The practical move is to work from the outside in: find every host that answers on an SSH port across your address ranges, including the ones that are not on the asset list, and check each one against the four conditions. What an external scan checks starts from what actually answers rather than what is documented, and the scanner will tell you where your SSH services are before you start arguing about which ones are musl.

Sources: Ethiack research, Alpine Linux advisory, Help Net Security, sshhole.com, OpenSSH fix commit. Exploitation telemetry is Previdian's, from a single sensor, and has not been independently corroborated.

← Back to blog