How to Patch the sshole OpenSSH Password Bypass on Alpine Linux (CVE-2026-123158)
OpenSSH 10.6p2 fixes a password bypass that is already being exploited. Here is how to check Alpine hosts, patch, restart sshd and look for a login.
On this page 7 sections
The sshole flaw (CVE-2026-123158) lets a remote attacker log in over SSH to an account that has no password. It affects OpenSSH servers on musl libc without PAM, the default on Alpine Linux. Upgrade OpenSSH, restart sshd, and set PasswordAuthentication to no. The package upgrade alone does not replace the running daemon.
This guide shows how to patch the sshole OpenSSH bypass on Alpine Linux. It is written for DevOps and security engineers who run Alpine on virtual machines, cloud images or appliances. Backtrace covers security fixes that reach real infrastructure, so every step below ends in a command you can run and a result you can check.
What Is the sshole Flaw in OpenSSH?
sshole is a password authentication bypass in sshd. A remote attacker sends one overlong password for an account that has no password set, and the server accepts it. It needs a single connection and works on every attempt, according to Alpine's advisory.
Alpine's security advisory describes the attacker's needs. The attacker must know the name of an account whose password field is a lone asterisk. The machine must also hold at least one other account with a real password hash. One such user makes every passwordless account reachable.
The root cause is a chain of old decisions. Without PAM, sshd hashes the attempt with crypt() and compares it with the stored hash. A 2016 change to stop user-enumeration timing attacks makes sshd borrow the salt of another account's hash when the target's field is too short. musl's crypt() refuses passwords longer than 256 bytes for SHA-256 and SHA-512 hashes and returns an asterisk instead of an error. That output matches the stored asterisk, so sshd accepts the login.
SOCRadar's analysis notes that the CVE record carries a CVSS 3.1 score of 8.1, which is High. The OpenSSH team calls its fix critical, and it notes that the root cause sits outside sshd. The fix is OpenSSH 10.6p2, which makes sshd reject a match when the stored password field is shorter than four characters.
Is Your Server Actually Affected?
Your server is affected only when four conditions hold at once. It runs sshd on musl without PAM, it allows password logins, it has an account with an asterisk password field, and it has another account with a real SHA-256 or SHA-512 hash.
Alpine lists the conditions like this:
- You run the
openssh-serverpackage, oropenssh-server-pamwithUsePAM no. PasswordAuthenticationisyes, which is the OpenSSH default.- At least one account has
*as its password field. - At least one other local account has a
$5$or$6$password hash.
The accounts with an asterisk are more common than they sound. Root ships as root:* in the base image since about Alpine 3.16. Any key-only user created with adduser and no password has one too. So do users supplied by a directory service through musl-nscd.
The default PermitRootLogin prohibit-password setting still blocks a direct root login. Indirect root access is the larger worry. Alpine's official tiny-cloud images from 3.18.11 through 3.24.3 let the default alpine user run commands as root with doas and no password. On those images, a login as alpine becomes full root control.
Several setups are safe. Containers that do not run sshd are not affected. Servers with PasswordAuthentication no are not exploitable, and cloud-init images set it that way. Systems that use openssh-server-pam with UsePAM yes are also fine, and so are glibc-based distributions.
How Do You Check Your Servers for the sshole Bug?
Check the OpenSSH package version, the effective sshd settings and the password fields in the shadow file. Three short commands answer all four conditions. Run them on every host that listens on port 22, including appliances and images that sit outside normal patch tracking.
Start with the package and its restart state:
apk info -v | grep openssh
rc-service sshd statusThen read the settings sshd actually uses, not the ones in the file you think you edited:
sshd -T | grep -iE 'passwordauthentication|usepam|permitrootlogin'Finally, list which accounts have no password and which have a real hash:
awk -F: '$2 == "*" {print $1}' /etc/shadow
awk -F: '$2 ~ /^\$[56]\$/ {print $1}' /etc/shadowIf the first list is not empty, the second is not empty, and password authentication is on, treat the host as exposed. One easy-to-miss trigger is a forgotten test account with a password hash on an otherwise key-only server. That single account is enough to make every other passwordless account reachable.
Record the results in a simple table of host, OpenSSH version, password setting and passwordless accounts. That inventory is also your proof, later, that every host was checked.
Do not forget what sits outside your fleet inventory. The researcher who reported the flaw also suggests checking musl-based OpenWrt, Buildroot and Yocto builds that include the OpenSSH server. Dropbear, the default SSH server on OpenWrt, is not affected.
How to Patch sshole and Restart sshd on Alpine
Upgrade the openssh package, then restart sshd so the patched binary is the one listening. Run apk upgrade -U -a and then rc-service sshd restart. Alpine published fixed packages for branches 3.16 through edge on November 5, 2026.
Stable branches received a backported patch, so only edge moved to OpenSSH 10.6p2. The table lists the fixed package for the branches most teams still run.
| Alpine branch | Fixed openssh package |
|---|---|
| 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 |
| 3.20 | 9.7_p1-r6 |
Images built from the 3.21.10, 3.22.8, 3.23.8 or 3.24.4 point releases, or later, already include the fix. Older base images need a rebuild. Roll the fix out in a sensible order. Start with hosts that expose port 22 to the internet, then move to hosts reachable only through a VPN or bastion. Internal hosts matter too, because an attacker who lands on one machine can try the same trick against its neighbors. Our guide on upgrading to Docker Engine 29.9.1 shows how to build a test plan for image changes like this one.
If you cannot patch yet, disable password logins. Set PasswordAuthentication no, ideally in a drop-in file under /etc/ssh/sshd_config.d on Alpine 3.19 and later. Change every PasswordAuthentication line in sshd_config, including lines inside Match blocks. Then validate the change:
- Run
sshd -tto catch syntax errors before restarting. - Keep one existing session open and restart sshd.
- Test a fresh key-based login from a second terminal.
- Confirm that
sshd -T | grep -i passwordauthenticationprintspasswordauthentication no.
Backtrace's editors flag the restart as the step that is easiest to skip. The package manager reports success, the version looks right, and the old process keeps answering connections until someone restarts it.
How Do You Tell Whether Someone Already Got In?
Search the authentication logs for password logins to accounts that should not have a password. On Alpine, look in /var/log/messages for "Accepted password for" entries naming an account such as alpine, root or a key-only user. Then review what happened after each login.
This is not a theoretical risk. SOCRadar's update reports that researchers recorded the first exploitation attempt less than nine hours after the CVE was published. They counted 20 attempts from 13 unique IP addresses by November 8, 2026. An attacker gained root on a honeypot and ran basic reconnaissance commands. The U.S. Cybersecurity and Infrastructure Security Agency (CISA) added the flaw to its Known Exploited Vulnerabilities catalog on November 9, 2026.
The same report says no compromise of a production system has been publicly confirmed. Do not read that as a reason to wait. The conditions are easy to test, and public proof-of-concept code exists, though researchers warn that some of it is unverified and may contain malware.
After a suspicious login, check for follow-on activity:
- Recent
doasuse and commands run as root. - Newly created users and changes to
authorized_keysfiles. - Requests to the cloud metadata service, which one attacker queried after gaining access.
- Reads of
/etc/shadowor root's SSH keys.
Alpine advises treating a machine as compromised if a login cannot be ruled out. That means rebuilding it from a clean image rather than cleaning it by hand. It also means rotating anything the host could read, including cloud credentials and deploy keys. Our guide to API key rotation best practices explains how to do that without breaking every client at once.
What Does sshole Mean for Patching Speed?
Linuxiac's report on OpenSSH 10.6p2 says the OpenSSH team will publish security fixes more often instead of holding them for scheduled releases. The project cites a rise in AI-assisted vulnerability reports and the risk that others find the same bugs. For teams, that means shorter gaps between disclosure and attack.
A good response is a triage rule set before the next advisory arrives. Exposed services first, then vulnerabilities on the CISA catalog, then everything else. Our write-up on Patch Tuesday triage for 1,411 fixes lays out one way to order the queue.
Conclusion
sshole is easy to exploit and easy to fix. Upgrade OpenSSH, restart sshd, and turn off password authentication wherever key logins are enough. Check the shadow file for accounts with no password, because those are the real targets.
Add a restart check to your patch runbook, so a package upgrade is never counted as finished until the daemon has been restarted.
Then look backward. Search the logs for password logins to passwordless accounts, and rebuild any host you cannot clear. A patched server can still be a compromised one.