SSHole (CVE-2026-123158): The OpenSSH Bypass on Alpine and musl Linux

SSHole, CVE-2026-123158, is an OpenSSH authentication bypass on Linux systems using musl libc without PAM, such as Alpine's default sshd. A password over 256 characters makes musl's crypt() return an asterisk, which matches locked accounts. OpenSSH fixed it in 10.6p2 on 5 November 2026, and attackers were exploiting it within days.

What actually broke

Accounts that should never accept a password store an asterisk in the password field of /etc/shadow. Key-only deploy users, directory-backed users, and root on recent Alpine releases all look like this. An asterisk is not a valid hash, so no password should ever match it. musl's crypt() has had two relevant behaviours since 2012. On failure it returns the string "" instead of a null pointer, and its SHA-256 and SHA-512 implementations refuse keys longer than 256 bytes. Send a password longer than that and crypt() fails, returns "", and sshd compares that output with the stored "". They are equal, so the login succeeds. The researcher's writeup at sshhole.com traces the account side to the same period. Alpine moved root from "!" to "" in 3.16 in 2022, which kept key logins working and put root in the affected shape. The fix in 10.6p2 stops trusting the comparison: sshd now rejects any stored hash shorter than a minimum length before comparing, as the oss-security announcement describes.

Who is exposed

Every condition below has to hold. Missing any one of them closes the hole, which is why the exposed population is narrower than the headlines suggest and also easy to miss.

The build

sshd linked against musl libc on Linux, with PAM not used for password checks. Alpine's default openssh-server package is built exactly this way. The researcher also lists Buildroot, Yocto, OpenWrt builds that ship OpenSSH, and many Docker images. glibc distributions such as Debian, Ubuntu and Fedora, PAM-based setups, Dropbear and OpenBSD are not affected. OpenWrt's default SSH server is Dropbear, so stock OpenWrt is fine.

The configuration and accounts

PasswordAuthentication left at its default of yes. At least one account with only "*" in its password field. Per Help Net Security's reading of the advisory, another local account must also hold a SHA-crypt hash, because sshd borrows a real salt when it hashes against an account with no usable hash. That borrowing is the timing defence OpenSSH added for CVE-2016-6210, and it is what routes the attempt through musl's crypt().

How bad a hit is

The attacker gets the account's own privileges. Root on Alpine has carried "" since 3.16, but the default PermitRootLogin setting refuses password logins for root, so root is reachable only where an administrator changed it. The sharper case is cloud images. Alpine's advisory notes that its official tiny-cloud images, 3.18.11 through 3.24.3, ship an alpine user with "" in the password field and passwordless doas, which is root in practice. Those images are safe on a first boot and become exploitable once any SHA-512 hash exists on the machine, which is the salt-borrowing condition above.

How fast it was exploited

OpenSSH released portable 10.6p2 on 5 November 2026 and credited Özgün Kültekin of Wakefield. Alpine pushed fixed packages the same day. Previdian, Ryan Dewhurst's firm, reported its first exploitation attempt less than nine hours after the CVE was published and confirmed root on an Alpine honeypot. Dewhurst called the bug particularly trivial to exploit. Proof-of-concept code appeared on GitHub within hours. Previdian warned it was unverified and could contain malware. BleepingComputer, citing GreyNoise, reports the first successful in-the-wild exploitation at 00:46 UTC on 7 November, about 40 hours after the fix. As of 9 November GreyNoise counted 17 exploitation chains from six attacker IPs, all against gridpoints it runs itself rather than networks it protects. Attackers ran system and container reconnaissance, queried cloud metadata, tried to read password hashes and root SSH keys, and edited authorized_keys for persistence. One gained root and installed a Python command-and-control implant GreyNoise calls TAC Agent, which never reached its server. CISA added the CVE to its Known Exploited Vulnerabilities catalogue on 9 November and set a 12 November remediation deadline for federal agencies under BOD 26-04. Exploitation is already public and simple to automate.

What to do now

Find every musl-based sshd that accepts passwords, including the ones nobody thinks of as servers: container images that run sshd for debugging, appliances, CI runners, and embedded boards. Then patch, restart, and look for use.

Patch and restart

On Alpine, run apk upgrade openssh and then restart sshd with rc-service sshd restart. Installing the package does not restart the running daemon, so the old binary keeps accepting the bypass until it is restarted. Older Alpine branches carry backported fixes under older version numbers, so check Alpine's security tracker for your branch instead of comparing against 10.6p2. Rebuild container images from patched bases. A running container does not update itself.

If you cannot patch today

Set PasswordAuthentication no in a drop-in under /etc/ssh/sshd_config.d and restart sshd. OpenSSH developer Damien Miller urged exactly this, or disabling SSH outright on affected systems. Key-only access is the right end state for most fleets anyway. Restricting port 22 to a bastion or VPN narrows who can try.

Look for use

Search auth logs for Accepted password lines on accounts that have no password, such as alpine, root, or key-only service users. Review authorized_keys files, recently created users, doas activity, new startup services, and outbound connections from the host. GreyNoise's indicators include the TAC Agent implant and its startup service. If compromise cannot be ruled out, treat the host as compromised and rebuild it rather than cleaning it.

The lesson outside SSH

This is a fail-open sentinel bug. A library chose an error value that is also a legitimate stored value, and a caller compared outputs instead of checking for failure. OpenSSH's release notes say the root cause is outside sshd but exploitable through it, and the fix is a defence in the caller. Both sides can be right, and the system still lets attackers in. Two habits would have caught it. First, check authentication primitives for failure explicitly, never by comparing an output that might be an error token. Second, test the strange inputs. The researcher ran about 17,600 unusual logins across glibc and musl builds, with and without PAM, and only one combination disagreed. Differential testing like that is cheap compared with an incident. For the response side, log which accounts accepted which method, so a login that should be impossible stands out the moment it happens.

Frequently asked questions

Is this the same as regreSSHion?
No. regreSSHion (CVE-2024-6387) was a signal handler race in sshd on glibc systems that could lead to remote code execution. This bug is an authentication bypass that only affects musl builds without PAM, where an oversized password matches a locked account's asterisk. Different platforms, different mechanism, different fix.
Are Debian or Ubuntu servers affected?
No. glibc distributions such as Debian, Ubuntu and Fedora are not affected, and neither are setups that check passwords through PAM, Dropbear, or OpenBSD. The exposure is sshd on musl libc with PAM off, which is Alpine's default openssh-server build and common in small container images and embedded Linux.
Does a long password work on every account?
No. It works only on accounts whose password field is the bare asterisk, the marker for accounts meant to have no password, such as key-only users or root on Alpine 3.16 and later. Accounts with a real password hash are unaffected, and root stays protected while PermitRootLogin keeps its default.
Is upgrading the package enough?
Not on its own. The running sshd keeps the old code in memory until it restarts, so restart the service after upgrading. Also rebuild container images, since containers built from an old Alpine base keep the vulnerable package. Then check logs for successful password logins to accounts that should have none.