If you run OpenSSH on Alpine Linux or another musl-based system without PAM, anyone can log into your locked or key-only accounts by sending a password longer than 256 bytes. Debian, Ubuntu and Fedora build OpenSSH against glibc, not musl, and they aren't affected.
The OpenSSH sshole vulnerability has been in the code for about ten years. OpenSSH 10.6p2 and fixed Alpine packages both shipped on November 5, 2026. As of November 2026, the patch is a day old.
The trigger conditions sound unusual, but on Alpine they're the defaults. sshd runs without PAM, password authentication is on, and users created without a password get a locked * entry. That puts Alpine-based containers and small cloud VMs well within reach, so treat this as urgent.
This is a narrow bug, not proof that all of SSH is broken. It is still a serious one. Check whether you're exposed, patch or mitigate, then hunt your logs.
Who's affected by sshole, and who isn't
| Platform or image | C library | SSH server and config | Exposed? | Notes |
|---|---|---|---|---|
Alpine 3.16–3.24, edge | musl | Default openssh-server, no PAM | Yes | Patch to 10.6p2 |
Alpine with openssh-server-pam | musl | UsePAM yes | No | PAM handles the password check |
Official Alpine cloud images 3.18.11–3.24.3 | musl | Default sshd | Yes | Built-in alpine user is a reported target |
Debian, Ubuntu, Fedora | glibc | OpenSSH | No | Not musl |
macOS | Not musl | OpenSSH | No | Outside the reported scope |
OpenWrt (stock) | musl | Dropbear | No | Dropbear isn't in scope |
OpenWrt with OpenSSH installed | musl | OpenSSH | Yes | Check the version and config |
Alpine-based Docker images | musl | sshd with defaults | Only if sshd runs with defaults | Most images don't run sshd |
Gitea, Gogs, Jenkins SSH agent, linuxserver openssh-server | musl | Password logins disabled | No | linuxserver is exposed with PASSWORD_ACCESS=true |
Void-musl or other musl distros, custom builds | musl | Varies | Check | Not confirmed affected |
The image findings come from Cycode's analysis of Alpine-based containers.
The dividing line isn't "Linux." It's musl, plus sshd checking passwords without PAM, plus password authentication left on. Your Ubuntu fleet and your MacBook aren't in this story. A slim Alpine VM, or a container someone gave sshd "just for debugging," is the kind of host that is. If you're on musl and any of the remaining conditions might apply, treat the host as exposed until you've checked it.
The conditions that must all be true, and how to check them in a minute
| Condition | Alpine default | Why it matters |
|---|---|---|
OpenSSH older than 10.6p2 | Yes, on 3.16 through 3.24 and edge until updated | 10.6p2 fixes the bug |
Built with musl libc | Yes | musl's crypt() returns * when it fails |
No PAM, or UsePAM no | Yes, in the default openssh-server package | sshd checks passwords itself |
PasswordAuthentication yes | Yes | The attacker needs a password prompt |
An account with * in /etc/shadow | Yes, adduser without a password writes it | This account is the target |
Another local account with a SHA-256 or SHA-512 hash | Common, since any user given a password counts | Required for the bypass to trigger |
Look at the middle column. The "rare combination" is just an untouched Alpine install with one human user who set a password.
The worst part is who this catches. If you reasoned "this user has no password, so only keys work," you're exactly who's exposed. On these hosts, a * is the opening, not a lock.
A clean check today also isn't permanent. Detectify points out that a host becomes exploitable later if, say, an admin sets a console password and completes the last condition. Safe Security adds that some directory-backed accounts with no shadow entry may be affected too, so an empty awk result doesn't fully clear you.
Run these as root. Each comment says what output means "exposed":
cat /etc/os-release # ID=alpine (or another musl distro)ssh -V # anything below OpenSSH_10.6p2apk info -v openssh-server # openssh-server, not openssh-server-pamsshd -T | grep -Ei 'usepam|passwordauthentication|permitrootlogin' # usepam no (or absent) + passwordauthentication yesawk -F: '$2=="*"' /etc/shadow # any line = a target accountgrep -E ':\$(5|6)\$' /etc/shadow # any line = the trigger condition is metIf every condition holds, skip ahead to the patch section.
How bad is it? Root access, CVE and severity
The vendor write-ups agree on how sshole works but not on how far it reaches. Here's where each one stands:
| Source | Root access claim | Severity wording | CVE status |
|---|---|---|---|
Detectify | Root protected by default PermitRootLogin prohibit-password; reachable only with PermitRootLogin yes | Critical | Not stated |
Cycode | Root protected by default; reachable only with PermitRootLogin yes | Not stated | Cites CVE-2026-123158 |
Orca | Root from a single connection on a default install (headline claim) | Not stated | No CVE assigned |
Safe Security | Full root compromise "in certain configurations" | High | Not stated |
TechJuice | Root protected by default; reachable only with PermitRootLogin yes | Not stated | Not stated |
Don't let the root debate slow you down. Most sources say root requires PermitRootLogin yes, but Orca's research write-up headlines root on a default install. Rather than guess which account is right, check your own host with sshd -T | grep -i permitrootlogin. If it returns yes, assume root is reachable.
Even prohibit-password isn't a reprieve. An attacker who lands on a key-only service account gets that account and everything it touches: deploy keys, database credentials, sudo rules. That's a full breach of the account, not a near miss. Patch with high urgency either way.
On the CVE: as of November 2026, Cycode's number and Orca's "none assigned" contradict each other. Confirm on NVD before you put CVE-2026-123158 into a ticket or scanner rule. Until then, track the issue by name and by the fixed version, OpenSSH 10.6p2.
Patch it: update OpenSSH, restart sshd, rebuild images
On servers and VMs
- Upgrade the package:
apk update && apk upgrade openssh. If apk says there's nothing to upgrade, check/etc/apk/repositoriesfor a stale or pinned mirror. - Confirm the installed build with
apk info -v openssh-server. Compare it with the fixed release listed in Alpine's security advisory or package database for your branch (3.16 through 3.24, or edge). Upstream, the fix is OpenSSH 10.6p2. - Restart the daemon:
rc-service sshd restart. The update does nothing until sshd restarts, because the running service stays on the old code. - Open a new SSH session in a second terminal and log in with your key. A successful login means the restarted sshd is serving connections.
Patch cloud VMs built from official Alpine images even if you never set a password. On official cloud images 3.18.11 through 3.24.3, the key-only alpine user is exactly the account this bypass targets.
In Docker images and Kubernetes
Running containers don't patch themselves. Upgrading the host does nothing for an image that already has OpenSSH baked into it.
- Rebuild from the updated Alpine base tag with
docker build --pull --no-cache -t yourimage .. To confirm, rundocker run --rm yourimage apk info -v openssh-serverand check the version against the advisory. - Audit CI so it can't reuse a stale cached base layer. Add
--pull, clear runner caches, and update any base image pinned by digest. Otherwise the pin keeps serving the old layer. - Redeploy the workloads, for example with
kubectl rollout restart deployment/<name>. Confirm withkubectl get pods -o widethat every pod is newly created, and check that each one reports the new image digest.
Can't patch today? Compare the mitigations
If you can't upgrade and rebuild today, you still have stopgaps. They differ in how fast they take effect, whether they actually stop the attack, and how likely they are to lock you out.
| Option | Speed | Fully blocks sshole? | Lockout risk | Best for |
|---|---|---|---|---|
Patch to 10.6p2 | Medium: package update, sshd restart, image rebuilds | Yes | Low | Every affected host, as soon as possible |
Disable password auth | Fast: two config lines and a restart | Yes | High if anyone still logs in with a password | Key-based fleets, today |
Switch to PAM | Slow: swap to openssh-server-pam and set UsePAM yes | Yes, it avoids the vulnerable code path | Medium, so test on one host first | Hosts that really need password logins |
Firewall port 22 | Fast: security group or IP allowlist | No | Low if your own IPs are on the list | Buying time on internet-facing hosts |
The firewall row only shrinks the attack surface. A compromised machine inside the same network or VPC can still reach sshd and send a 257-byte password.
Also keep root out of the picture. Sources disagree on whether root is reachable, and Detectify says the default prohibit-password setting protects it. Make sure nobody has changed that setting to yes.
PasswordAuthentication noKbdInteractiveAuthentication noPermitRootLogin prohibit-passwordRun sshd -t to validate the config, then rc-service sshd restart. Keep your current session open until a fresh key-based login works from a second terminal.
As of November 2026, the best stopgap is to disable password auth on every host where you can do it safely right now. Then patch to 10.6p2 as soon as your change window allows. After you've patched, leave password auth off permanently, because it's the right default for SSH with or without this bug.
Check your logs for signs you were already hit
-
Search Alpine's default log for password logins. On Alpine, sshd's syslog output goes to
/var/log/messages. Include the rotated copies as well.bashgrep 'Accepted password for' /var/log/messageszgrep 'Accepted password for' /var/log/messages* -
Flag any hit for an account that has no password. Compare each username against
awk -F: '$2=="*"' /etc/shadow. A password login foralpine, root or a key-only service user shouldn't be possible at all, so a single matching line is enough to act on. -
Run the same search in your centralized logs. Containers often write sshd output to stdout instead of
/var/log/messages, so querydocker logs, your Kubernetes log pipeline or your SIEM. Local files may also have rotated away before you looked. Search back to the date the host or image was first deployed, not just the last week. -
Isolate any host with a hit. Orca's guidance is to treat it as compromised. Cut it off at the security group or firewall instead of deleting it, so you keep the evidence. Confirm that port 22 and the host's outbound traffic are actually blocked.
-
Rotate every secret that account could reach. That covers cloud credentials, API tokens, deploy keys, database passwords in env files, and any SSH keys stored on the box.
-
Check for persistence. Look at
~/.ssh/authorized_keysfor every user, the crontabs (/etc/crontabsand/etc/periodicon Alpine), and/etc/sudoers,/etc/sudoers.dordoas.conf. Anything you didn't add should be treated as a backdoor. Rebuild from a patched, clean image instead of trusting a cleanup.
How a 257-byte password unlocks an account with no password
On Alpine, an account you create with adduser and no password, or one you've deliberately locked, gets a single * in the password field of /etc/shadow. No real password hash ever looks like *, so under normal rules nothing typed at a login prompt can match it.
When sshd runs without PAM, it checks passwords itself. It hashes whatever the client sent using musl's crypt() and compares the result to the string stored in shadow. Send a password between 257 and 1,024 bytes and crypt() fails. musl reports that failure by returning *.
That's the whole trick. sshd compares the * it got back against the * on file, sees two identical strings, and accepts the login. It takes one connection and no guessing.
Neither piece is broken on its own. Returning * on error is a defensible way for a C library to say "no valid hash here," and comparing hash strings is how password checks work everywhere. Together, they turn the "no password" marker into a password anyone can type.
Locked isn't the same as empty
Some early coverage, including Tom's Hardware's report on the combined flaws, described the targets as "empty password" accounts. An empty field and a * are different things. The accounts at risk are the locked and key-only ones, the users you set up specifically so that only an SSH key would get in.
The 2016 fix that set the trap
The root cause traces back to the fix for CVE-2016-6210, a username-enumeration bug. That change made sshd hash password attempts even for accounts with no usable hash. According to the researchers' write-ups, exploitation also requires at least one other local account with a real SHA-256 or SHA-512 hash.
A fix for one problem quietly created another, and it sat in the code for about ten years.
Edge cases that catch admins out
Most surprise exposures come from something added later or built by hand, not from the original install.
- A password set after the fact. Giving any account a console or recovery password can supply the real hash the exploit needs, as Detectify warns. Rerun the
/etc/shadowhash check after every password change, not just once. - Directory-backed accounts. Users that come from a directory service and have no shadow entry may also be affected, according to Safe Security. Don't treat "not in shadow" as safe. Turn off password auth until you've patched.
- OpenWrt with OpenSSH swapped in. Stock Dropbear isn't vulnerable, but routers and appliances where someone replaced it with OpenSSH are. Run
ssh -Von the device to see which server answers on port 22. - Custom builds on other musl distros. Void-musl and similar systems aren't confirmed affected. A pre-10.6p2 build running without PAM still fits the pattern, so check the version and
sshd -Toutput. - Debug and third-party images. Alpine images that add sshd "just for debugging," or linuxserver's openssh-server with
PASSWORD_ACCESS=true, turn password logins back on. Rebuild them or setPasswordAuthentication no.
Why this one was found by AI, and why that shortens your window
According to TechJuice's account of the discovery, the researcher who found this decade-old bug used AI agents to run roughly 17,600 authentication tests. That's the kind of edge-case grinding, with oversized passwords and odd account states, that human reviewers rarely finish. OpenSSH's Damien Miller reportedly argued that long embargoes now mostly help attackers because AI makes rediscovery fast. That view comes from an X summary, not his own published words, so treat it as secondhand. Either way, the disclosure and 10.6p2 shipped together on November 5, 2026. Attackers can read the patch as easily as you can, so assume they're already scanning for exposed Alpine sshd.
The pattern deserves scrutiny beyond OpenSSH. Any program that calls crypt() on musl and compares the output to a stored hash could, in principle, mistake musl's * error value for a match. As of November 2026, no other affected software has been confirmed. If you run custom login code or appliance auth services on musl, check how they handle a failed crypt() call.
Frequently Asked Questions
Will fail2ban or SSH rate limiting stop the sshole attack?
No. Fail2ban bans an IP only after it sees several failed logins, and sshole doesn't need any failures. One connection with a 257-to-1,024-byte password succeeds on the first try, so there's nothing for fail2ban or a rate limiter to count. Keep them running for ordinary brute-force noise, but they don't close this hole. Patching to 10.6p2 or setting PasswordAuthentication no does.
My Alpine container doesn't run sshd. Am I exposed to sshole?
Not through this bug. sshole lives in sshd's own password check, so a container that never starts sshd has nothing to attack, even if it's built on Alpine. Before you rule it out, confirm the claim. Check your Dockerfiles and entrypoint scripts for openssh-server, and run ps inside a running container to see whether sshd is there. If any image does run sshd, rebuild it from an updated base.
Does moving SSH to a non-standard port protect against sshole?
No, not in any meaningful way. A different port cuts down on drive-by scanner traffic, but a basic port scan still finds sshd within seconds, and the exploit needs only one connection once it does. Machines already inside your network don't care which port you picked. Treat a custom port as noise reduction. The real protection is the 10.6p2 patch, turning off password authentication, or running sshd with PAM.
Your sshole to-do list for today
Work through these in order, and stop at whichever one you can't finish today:
- Run the one-minute check:
ssh -Vfor the version,sshd -Tfor the effective settings, andawk -F: '$2=="*"' /etc/shadowfor locked or key-only accounts. - Set
PasswordAuthentication noand restart sshd, or upgrade to OpenSSH 10.6p2 withapk update && apk upgrade opensshfollowed byrc-service sshd restart. Updating the package without restarting sshd leaves the old code running. - Rebuild and redeploy every Alpine-based image that runs sshd. Running containers won't patch themselves.
- Grep
/var/log/messagesand your central logs forAccepted password foron accounts that have no password. Treat any hit as a compromised host.
As of November 2026, this story is a day old, so expect several details to change this week. Check NVD to see whether CVE-2026-123158 is confirmed and what CVSS score it gets. Watch Alpine's advisory for the exact fixed package versions on your branch. Confirm that the official cloud and Docker images have been refreshed before you rebuild from them. Also look for reports of exploitation in the wild and for advisories from other musl-based distros.
Finally, make one change permanent. Put PasswordAuthentication no in your base sshd config and in every image template. With password logins off, sshd never offers the password prompt this attack needs.
Sources
- Critical vulnerability: OpenSSH authentication bypass on Alpine Linux - Blog Detectify · blog.detectify.com
- sshole (CVE-2026-123158): OpenSSH password bypass on Alpine Linux - Cycode · cycode.com
- *sshole: OpenSSH Authentication Bypass Gives Attackers Root on Alpine Linux · orca.security
- Combined flaws let anyone into Alpine Linux and other distros by typing anything over 256 characters as a password — emergency fixes for OpenSSH and musl-libc issued for millions of systems, patch immediately · tomshardware.com
Want more from ScriptHill in Google? Add us as a preferred source



