Sign up to CovertSwarm Threat Alerts.
Receive our Threat Alerts in your inbox as soon as they're available.
CovertSwarm Threat Alert
SSHole is a critical OpenSSH authentication bypass on musl Linux systems such as Alpine that lets an unauthenticated attacker log in to accounts with no password set. OpenSSH fixed it in version 10.6p2, and Alpine has published fixed packages.
Get Threat Alerts in your inbox
A critical authentication bypass vulnerability known as SSHole affects OpenSSH on Linux systems built on musl libc, such as Alpine Linux.
The flaw lets a remote, unauthenticated attacker log in to accounts that have no password set, using any password between 257 and 1,024 bytes long. That includes SSH key-only accounts and, in certain configurations, the root account.
The root cause lies in an interaction between three design decisions that are each reasonable on their own.
First, OpenSSH was changed to prevent username enumeration (CVE-2016-6210). A login attempt may target an account with no valid password hash, for example one with only * in its shadow entry. In that case, sshd borrows the salt from another account that has a real hash. This keeps timing consistent whether or not the account has a valid password.
Second, musl’s crypt() function was changed to return an unmatchable hash (*) rather than NULL on failure, because many programs didn’t check for NULL.
Third, a change on August 29, 2012, added a hard limit of 256 bytes on password length. It was meant to mitigate denial of service through expensive hash computation. When a password exceeds 256 bytes, musl’s crypt() silently returns * without hashing.
When an attacker targets an account with * in its shadow entry, sshd borrows a $5$ or $6$ salt from another account. It then calls crypt() with the attacker’s password. If that password is longer than 256 bytes, musl returns *.
sshd then compares *, the result of crypt(), against *, the stored value. It finds them equal and grants access. The attack works with any password between 257 and 1,024 bytes, which is the maximum sshd accepts.
Accounts with a real password hash aren’t affected, because their stored value is a full hash string, not *.
The vulnerability is tracked as CVE-2026-123158.
OpenSSH has rated the flaw critical.
A successful attacker logs in to an account with no password set, without credentials. Accounts at risk on a default Alpine installation include:
adduser without a password, or set with usermod -p '*'.root:* in base images since Alpine 3.16. It’s protected by PermitRootLogin prohibit-password by default, but exploitable if that setting is changed.$6$ hash is present on the machine. On images 3.18.11 to 3.24.3, it can escalate to root through passwordless doas.Exploitation requires only network access to the server, a valid account name and a suitably long password. No credentials, prior access or user interaction are needed. The attack succeeds on every attempt with a single connection.
As of November 19, 2026, no vetted public detection template had been released.
OpenSSH versions before 10.6p2 are affected when deployed on any musl-based Linux system, including Alpine, OpenWrt with OpenSSH installed, Buildroot and Yocto.
On Alpine Linux, the openssh-server package built without PAM is affected in these versions:
$6$ hash is present on the machine.These systems aren’t affected:
UsePAM yes).PasswordAuthentication no.PasswordAuthentication no automatically.! in /etc/shadow.OpenSSH released a fix in version 10.6p2. Alpine has published fixed packages for every supported branch back to 3.16, including end-of-life branches.
Upgrade the Alpine openssh-server package to a fixed version and restart sshd. A package upgrade alone doesn’t restart the running daemon:
apk upgrade -U -a
rc-service sshd restart
Fixed point releases by branch:
For upstream OpenSSH, upgrade to version 10.6p2 or later. Container images that pin an OpenSSH or Alpine version must be rebuilt, because a package upgrade inside an unchanged image layer won’t take effect.
Where immediate patching isn’t possible, disable password authentication first. Confirm key-based login works and keep your current session open. Then set PasswordAuthentication no in /etc/ssh/sshd_config, or in a drop-in under /etc/ssh/sshd_config.d/ on Alpine 3.19 and later. Validate with sshd -t and restart sshd.
Confirm the setting is active with:
sshd -T | grep -i passwordauthentication
Additional mitigations:
* with ! in /etc/shadow for any account that shouldn’t authenticate by password.PermitRootLogin no if direct root SSH isn’t required.To find exposed accounts, look for accounts with * in their shadow entry on a system that also has at least one $5$ or $6$ hash. List accounts with no password (an asterisk-only shadow entry):
awk -F: '$2 == "*" {print $1}' /etc/shadow
Confirm at least one $5$ or $6$ hash exists, which enables the attack:
grep -c ':\$[56]\$' /etc/shadow
Review /var/log/messages for successful password logins on accounts that shouldn’t accept password authentication:
grep 'Accepted password for' /var/log/messages | grep -E 'alpine|root'
Get Threat Alerts in your inbox