Alpine Linux SSH Vulnerability: Fix SSHole Before Attackers Do
A critical Alpine Linux SSH vulnerability (SSHole, CVE-2026-123158) lets attackers skip passwords on Docker hosts. Here's how to check and fix it fast.
By Babul Jack
A newly disclosed Alpine Linux SSH vulnerability, tracked as CVE-2026-123158 and nicknamed SSHole, lets a remote attacker log in to locked accounts like root by sending an oversized password. It affects OpenSSH builds on musl libc (Alpine, OpenWrt, Buildroot, Yocto) with PAM disabled, and it is already being exploited in the wild as of November 2026.
I run a lot of client infrastructure on Alpine because the images are small and the attack surface is supposedly minimal. That is exactly why this bug stung when I first read the disclosure. It is not an exotic kernel exploit. It is a decade-old interaction between two "safe" design decisions that nobody tested together, and it is reachable with a single SSH connection and no credentials at all.
In this post I will walk through what SSHole actually does, which of your containers and VMs are exposed, how to check right now, and how I patched client environments the same week it went public.
What is the Alpine Linux SSH vulnerability (SSHole)?
SSHole is an authentication bypass in OpenSSH's password-checking code (auth-passwd.c) when sshd is built against musl libc without PAM support. OpenSSH's own release notes for 10.6p2 credit the discovery to researcher Özgün Kültekin and describe the fix as closing a password-authentication bypass.
The short version: musl's crypt() function returns the single character * when asked to hash a password longer than 256 bytes, because that is its internal error value. On Linux, * in /etc/shadow also means "this account has no usable password." sshd, with no PAM layer to lean on, compares the hash it just computed against the stored shadow field as plain strings. If an attacker sends a password between 257 and 1,024 bytes, musl's error value and the account's locked marker both come back as *, the strings match, and sshd lets the attacker in.
CISA added CVE-2026-123158 to its Known Exploited Vulnerabilities catalog on November 9, 2026, with a federal remediation deadline of November 12 - a two-day window that signals how seriously the agency treated it.
Why does this matter if you don't run bare Alpine servers?
Most teams I work with do not SSH into production Alpine boxes directly, but almost everyone pulls the official alpine Docker base image somewhere in their build pipeline, and that official image has been pulled more than 12 billion times from Docker Hub according to its public pull counter. That is the real exposure: CI runners, bastion hosts, edge devices, and any custom VM image built on Alpine for its small footprint.
Alpine has shipped root:* in its shadow file by default since roughly version 3.16, specifically so root cannot log in with a password. That default, which was a genuinely good security decision at the time, is exactly the condition SSHole needs to work.
In client projects I have audited this year, the pattern shows up most in three places: lightweight bastion hosts built on Alpine for cost reasons, self-hosted CI agents, and IoT or edge gateways running Buildroot or OpenWrt, which use the same musl libc. None of those are "someone else's problem" infrastructure - they are usually the exact boxes with the widest network reach into everything else.
Which systems are actually exposed?
You are exposed only when every one of these is true at the same time:
sshd runs on musl libc (Alpine, OpenWrt, Buildroot, Yocto) - glibc-based distributions like Debian, Ubuntu, Fedora, and Amazon Linux are not affected.
PAM is disabled. Alpine's default openssh-server package is built without PAM; openssh-server-pam with UsePAM yes is safe.
PasswordAuthentication yes is set - this is OpenSSH's default.
At least one account has * as its shadow password field (root on Alpine, a key-only deploy user, or the alpine user on Alpine's official AWS/Azure cloud images).
At least one other local account has a $5$ or $6$ crypt hash, which sshd borrows a salt from.
Red Hat and Amazon have both stated their glibc-based products are not affected. Dropbear and OpenBSD's native sshd are also out of scope. That narrows the blast radius, but it does not shrink it much, because Alpine is the default base image for a huge share of containerized workloads.
Quick checklist to test a host
Check the OpenSSH build and version: ssh -V or, on Alpine, apk info -v openssh-server openssh-server-pam.
Check whether PAM is in use: sshd -T 2>/dev/null | grep -i '^usepam' (a result of no is the vulnerable configuration on Alpine).
List locked accounts: sudo awk -F: '$2=="*"{print $1}' /etc/shadow.
List accounts with a real hash sshd could borrow: sudo awk -F: '$2 ~ /^\$[56]\$/{print $1}' /etc/shadow.
If steps 2 through 5 all come back positive, that host is exploitable right now, with no credentials, over the network, in a single connection.
How do I fix the SSHole vulnerability?
The fastest, most reliable fix is to upgrade OpenSSH. On any musl-based distribution:
Upgrade to OpenSSH 10.6p2 or later, or the equivalent fixed package for your distribution's branch.
On Alpine specifically: apk upgrade -U -a followed by rc-service sshd restart. Upgrading the package alone does not restart the running daemon, and a container rebuilt from a patched base image still needs to be recreated, not just re-pulled.
Verify the version and PAM/password settings again using the checklist above.
If you cannot patch immediately, the practical mitigation is to turn password authentication off entirely:
Keep an existing key-based session open while you test this, and check every Match block in sshd_config, since a global drop-in file does not override settings inside those blocks. If you genuinely need password logins and cannot patch yet, replace * on any reachable account with ! instead - that blocks password logins without affecting key-based access, though it is a stopgap, not a fix.
Fix
Effort
Protection
Upgrade to OpenSSH 10.6p2+
Low (one command + restart)
Full, root-cause fix
Disable password authentication
Low (one config line)
Full for this bug, but removes legitimate password logins
Lock * accounts to !
Medium (per-account)
Partial - closes only the accounts you touch
Do nothing
None
None - actively exploited
Why did a ten-year-old design choice become a 2026 crisis?
The bug has existed since 2016, when OpenSSH added a timing-attack mitigation for an earlier flaw, CVE-2016-6210, which let attackers detect valid usernames by timing how fast logins failed. To make failed logins take a consistent amount of time, OpenSSH started borrowing a salt from any other account's hash and running the comparison anyway, even for accounts that should never accept a password at all.
That change, paired with a 256-byte cap musl had already placed on SHA-512 crypt inputs back in 2012 as a denial-of-service guard, created the exact collision SSHole exploits. Neither change was wrong in isolation. OpenSSH is mostly tested on OpenBSD and glibc systems, and most Linux distributions route authentication through PAM, which does not hit this code path the same way. The combination simply never got exercised until a researcher specifically went looking for it, reportedly testing around 17,600 unusual login attempts across build configurations before finding it.
The lesson I keep coming back to on client codebases is that security fixes rarely compose safely by default. Every mitigation changes behavior somewhere else in the stack, and the only way to catch it is deliberately testing unusual configurations, not just the common path.
How fast are attackers moving on disclosed CVEs like this?
Fast enough that the old model of a 90-day disclosure window is already outdated. OpenSSH's maintainer Damien Miller said the team rushed the 10.6p2 release "because we have recently observed multiple cases of rapid bug rediscovery by AI agents, sometimes within hours, and so now consider long embargo periods to be a dangerous practice that primarily benefits attackers."
That was not hypothetical caution. Exploitation attempts against SSHole were observed within hours of public disclosure, and threat-intelligence reporting linked some of the early activity to a group tracked as GT10 deploying backdoors with reconnaissance and persistence capabilities. CISA's KEV listing followed within days. If your patch cadence for internet-facing services is measured in weeks, this is the kind of bug that makes that cadence a liability - and it's a recurring theme across the npm supply chain risks and the Node.js TLS key leak I've covered this quarter: the gap between disclosure and exploitation keeps shrinking.
How I handle this in client infrastructure reviews
When I run a security audit for a client, SSH exposure is one of the first things I check, right alongside dev-server exposure like the Vite --host flag RCE risk. For infrastructure built on Alpine - which is common in client projects precisely because of its small image size - I now treat "musl + no PAM + password auth enabled" as a configuration to flag by default, not an edge case.
Concretely, that means: inventorying every host and container image built on Alpine, Buildroot, or OpenWrt; confirming OpenSSH version and PAM status on each; and, where password authentication isn't a hard requirement, disabling it outright rather than relying on patch timing alone. If you want a third party to walk through this across your stack, that is exactly the kind of gap a security audit is built to catch before an attacker finds it first.
Frequently asked questions
Does the SSHole vulnerability affect Ubuntu, Debian, or Amazon Linux?
No. SSHole only affects systems where sshd is built against musl libc with PAM disabled. Ubuntu, Debian, Fedora, and Amazon Linux 2/2023 use glibc and PAM, so Red Hat and Amazon have both confirmed their products are not affected.
I only use SSH key-based logins on Alpine - am I still at risk?
You're at much lower risk, but check anyway. The bug only triggers when PasswordAuthentication yes is in effect, which is the OpenSSH default even on systems where you intend to use only keys. If you haven't explicitly set PasswordAuthentication no, verify it with sshd -T.
Is root exploitable by default on Alpine?
Not directly, because Alpine's default PermitRootLogin prohibit-password blocks password logins to root even if the shadow field is *. Root becomes reachable if PermitRootLogin yes is set, or through a different * account that has passwordless doas or sudo access to root, which is the default setup on Alpine's official cloud images.
Do I need to rotate my SSH keys after patching?
Rotating keys is not required by the bug itself, since SSHole is a password-comparison flaw, not a key-compromise bug. If you have log evidence of a successful "Accepted password" login on an account that should never take one, treat that host as compromised and rotate keys, tokens, and credentials reachable from it as a precaution.
What is the difference between this and a typical brute-force SSH attack?
A brute-force attack tries many passwords against a real password hash and can be slowed with rate limiting or fail2ban. SSHole needs exactly one connection with a single oversized password against an account that has no real password at all, so traditional brute-force defenses don't reduce the risk - only patching or disabling password authentication does.
Key takeaways
SSHole (CVE-2026-123158) lets attackers log into password-locked accounts on musl-based Linux systems, including Alpine, by sending a password between 257 and 1,024 bytes.
It only affects OpenSSH built against musl libc with PAM disabled and password authentication enabled - glibc distributions like Ubuntu, Debian, and Amazon Linux are not affected.
The fix is OpenSSH 10.6p2 or later; the fastest mitigation if you can't patch immediately is setting PasswordAuthentication no and restarting sshd.
Exploitation began within hours of disclosure and CISA added it to its Known Exploited Vulnerabilities catalog within days, underlining how fast real-world exploitation now follows public disclosure.
Audit every Alpine, OpenWrt, Buildroot, or Yocto-based host and container image in your stack, not just production servers - CI runners and edge devices are commonly missed.