Security · Published 2026-11-06
SSHole (CVE-2026-123158): Are You In Scope, and Which Account Is the Target?
SSHole (CVE-2026-123158) hits Alpine OpenSSH without PAM. Check the package, not sshd -V, plus effective settings and accounts. Read-only audit, tested.
CVE-2026-123158, nicknamed SSHole, lets an unauthenticated attacker log in to an account that has no usable password by sending an oversized password. It affects OpenSSH on Linux when it runs on musl libc without PAM, which is how Alpine Linux ships its OpenSSH server. OpenSSH fixed it in 10.6p2, and Alpine published patched packages for every branch back to 3.16.
This post is a defensive read for people who run sshd on Alpine: how to tell whether a host is exposed, which account is the target, and what to do. We did not reproduce the exploit. We say which statements come from the advisories, which come from our own tests and which are our reasoning.
Short version
- Who is in scope: OpenSSH on Linux with musl and without PAM. The OpenSSH announcement says the bug does not exist on non-Linux systems, on Linux/glibc, or on Linux systems that use PAM for password authentication.
- What Alpine says must all be true: the server is Alpine's
openssh-server(built without PAM) oropenssh-server-pamwithUsePAM no;PasswordAuthenticationisyes; an account has a password field of exactly*; and at least one other account has a$5$or$6$password hash. The package must also not be a fixed one. - A version string is not a verdict. On a fresh
alpine:3.22,sshd -VprintsOpenSSH_10.0p2, which is below 10.6p2, yet the installed package is10.0_p1-r11, the fixed version for that branch. Alpine backports the fix, so check the package. - Fix:
apk upgrade -U -a, then restart sshd, because an upgrade does not replace the running daemon. If you cannot update yet, setPasswordAuthentication no. passwd -lis not a fix for key-only accounts you still need. We tested it: a locked (!) account is refused for key logins too.- The audit below is a preliminary check, not a scanner. A clean result is not proof of safety.
What the sources say
OpenSSH (primary). Damien Miller announced 10.6p2 on openssh-unix-dev on 5 November: "If you operate a Linux system that uses musl libc without PAM (Alpine Linux is one example) then stop reading and set PasswordAuthentication=no or disable SSH for these systems IMMEDIATELY." The release notes call it a "critical security workaround" and say the root cause is outside sshd, "but it is exploitable via sshd and can be avoided there". The core of the fix, in the commit linked below, is that sshd no longer accepts a password match when the stored hash is shorter than four characters. The bug was reported by Özgün Kültekin of Wakefield.
CVE record (primary). Published 5 November, scored CVSS 3.1 8.1 High (network, high attack complexity, no privileges). It names OpenSSH before 10.6p2 on Linux with musl and no PAM, and says the bypass works "for some configurations of accounts" with a password of 256 to 1024 characters. Alpine's advisory words the range as 257 to 1024 bytes.
Alpine (primary). Its advisory of 5 November lists the conditions in the short version above, the fixed packages below, and the mechanism: when sshd has no PAM, it hashes the attempt with crypt() and compares the result with the stored field. For an account whose stored field is too short to hold a salt, sshd borrows the salt of another account. musl's crypt() returns * as an error when the key is over 256 bytes, and * is exactly what the stored field contains for an account with no password, so the "hash" matches. That is why one account with a real hash makes every * account reachable.
Press (secondary). The Hacker News, citing Previdian, reports a first exploitation attempt less than nine hours after the CVE was published, root access confirmed on an Alpine honeypot, and eight attempts from one address that ran id, uname and hostname. It also links the bug to a 2016 username-enumeration fix (CVE-2016-6210) and says Dropbear is not affected. The OpenSSH and Alpine advisories say neither, and we did not verify these three statements.
Which package is fixed
Alpine's advisory lists the fixed version of the openssh source package for each branch:
| Alpine branch | Fixed openssh version |
|---|---|
| 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 |
| 3.19 | 9.6_p1-r3 |
| 3.18 | 9.3_p2-r4 |
| 3.17 | 9.1_p1-r7 |
| 3.16 | 9.0_p1-r6 |
Alpine 3.21.10, 3.22.8, 3.23.8 and 3.24.4 ship the fixed package. Unsupported branches got fixed packages too. Alpine's security tracker lists only the openssh source package for this CVE, and the binary packages (openssh-server, openssh-server-pam, openssh-server-common) share its version.
Tested. On a fresh alpine:3.22 (release 3.22.8) the installed packages were:
# Installed OpenSSH server packages with their versions, then the upstream string of the daemon.
apk list -I 'openssh-server*'
sshd -V# Real output, alpine:3.22 container, 6 November 2026
openssh-server-10.0_p1-r11 x86_64 {openssh} (SSH-OpenSSH) [installed]
openssh-server-common-10.0_p1-r11 x86_64 {openssh} (SSH-OpenSSH) [installed]
openssh-server-pam-10.0_p1-r11 x86_64 {openssh} (SSH-OpenSSH) [installed]
OpenSSH_10.0p2, OpenSSL 3.5.9 29 Sep 2026The package equals the fixed version while the upstream string says 10.0p2. To compare an installed version with a fixed one, apk version -t prints <, = or > (apk version -t 10.0_p1-r10 10.0_p1-r11 printed <, and the same version against itself printed =). On Alpine 3.22, apk info -v openssh-server prints the package description, not the version, so use apk list -I.
Is PAM in play?
Alpine builds the stock openssh-server without PAM. The separate openssh-server-pam package installs a PAM-capable daemon (sshd.pam), and per Alpine it is not affected only when UsePAM yes is set. Having PAM installed is not the same as using it. Tested: on the stock package, sshd -T prints no usepam line at all, and sshd.pam -T prints usepam no by default. So with the pam package, check the usepam value sshd -T reports for the daemon you actually run.
The * account ships by default
On a stock Alpine image the root account already stores *. This is read-only:
# Read-only: a fresh Alpine image ships root with an asterisk password field. No login is attempted.
docker run --rm alpine:3.22 grep '^root:' /etc/shadow# Real output from a fresh alpine:3.22 pull, 6 November 2026
root:*::0:::::Alpine says root has shipped as root:* since about 3.16. That is only one of the accounts that can carry the precondition. Alpine also lists key-only users created without a password, the alpine user in the official tiny-cloud images (which also has passwordless doas), and users from a directory service through musl-nscd, which have no shadow entry.
The audit: findings, not a verdict
The script prints five findings and a preliminary reading. It only reads configuration and /etc/shadow, makes no login attempt and changes nothing. Run it as root: sshd -T and /etc/shadow need it. The fixed versions in it are Alpine's, from the table above.
# SSHole exposure audit for Alpine. Read-only: it reads configuration and /etc/shadow and attempts no login.
# A preliminary assessment, not a scanner. Run it as root: sshd -T and /etc/shadow need it.
echo "1. libc"
if ls /lib/ld-musl-* >/dev/null 2>&1; then echo " musl"; else echo " not musl: outside the combination in the OpenSSH advisory"; fi
echo "2. OpenSSH package"
if ! command -v sshd >/dev/null 2>&1; then echo " sshd is not installed: nothing to assess"; exit 0; fi
echo " upstream string: $(sshd -V 2>&1 | head -1) (Alpine backports fixes, so this alone proves nothing)"
inst=$(apk list -I openssh-server 2>/dev/null | awk '{print $1}')
inst=${inst#openssh-server-}
echo " installed package: ${inst:-unknown}"
branch=$(cut -d. -f1,2 /etc/alpine-release 2>/dev/null)
case "$branch" in # fixed versions from Alpine's advisory of 2026-11-05
3.16) fixed=9.0_p1-r6;; 3.17) fixed=9.1_p1-r7;; 3.18) fixed=9.3_p2-r4;; 3.19) fixed=9.6_p1-r3;;
3.20) fixed=9.7_p1-r6;; 3.21) fixed=9.9_p2-r1;; 3.22) fixed=10.0_p1-r11;; 3.23) fixed=10.2_p1-r1;; 3.24) fixed=10.3_p1-r2;;
*) fixed="";;
esac
below=1
if [ -n "$fixed" ] && [ -n "$inst" ]; then
if [ "$(apk version -t "$inst" "$fixed")" = "<" ]; then echo " BELOW the fixed $fixed for Alpine $branch"
else below=0; echo " at or above the fixed $fixed for Alpine $branch"; fi
else echo " branch ${branch:-unknown} is not in this table: compare by hand with Alpine's advisory"; fi
echo "3. Effective sshd settings (add -C user=NAME,host=HOST,addr=IP to test a Match block)"
cfg=$(sshd -T 2>&1); pw=unknown
case "$cfg" in
"") echo " sshd -T printed nothing";;
*"no hostkeys"*|*"Permission denied"*) echo " sshd -T failed: $(echo "$cfg" | head -1)";;
*) echo "$cfg" | grep -Ei '^(permitrootlogin|passwordauthentication|kbdinteractiveauthentication|usepam|authenticationmethods) ' | sed 's/^/ /'
echo "$cfg" | grep -qi '^usepam ' || echo " (no usepam line: this build has no PAM support)"
pw=$(echo "$cfg" | awk '$1=="passwordauthentication"{print $2}');;
esac
echo "4. Accounts"
if [ -r /etc/shadow ]; then
star=$(awk -F: '$2=="*"{print $1}' /etc/shadow | tr '\n' ' ')
hashed=$(awk -F: '$2 ~ /^\$[56]\$/{print $1}' /etc/shadow | tr '\n' ' ')
echo " password field exactly *: ${star:-none}"
echo " with a \$5\$ or \$6\$ hash: ${hashed:-none}"
else echo " /etc/shadow is not readable: run as root"; fi
echo "5. Preliminary reading"
if [ "$below" = 0 ]; then
echo " The package is patched. If you upgraded after sshd started, restart it (rc-service sshd restart)."
elif [ "$pw" = yes ] && [ -n "${star:-}" ] && [ -n "${hashed:-}" ]; then
echo " The conditions in Alpine's advisory appear met: password login on, an account with *, an account with a \$5\$ or \$6\$ hash, package not confirmed fixed. Update and restart, or set PasswordAuthentication no, now."
else
echo " At least one condition is not met or could not be read. That is not proof of safety: Match blocks, a daemon started before an upgrade and other accounts can differ. Update anyway."
fi# Real output: stock alpine:3.22 with openssh-server and host keys, run as root
1. libc
musl
2. OpenSSH package
upstream string: OpenSSH_10.0p2, OpenSSL 3.5.9 29 Sep 2026 (Alpine backports fixes, so this alone proves nothing)
installed package: 10.0_p1-r11
at or above the fixed 10.0_p1-r11 for Alpine 3.22
3. Effective sshd settings (add -C user=NAME,host=HOST,addr=IP to test a Match block)
permitrootlogin without-password
passwordauthentication yes
kbdinteractiveauthentication yes
authenticationmethods any
(no usepam line: this build has no PAM support)
4. Accounts
password field exactly *: root
with a $5$ or $6$ hash: none
5. Preliminary reading
The package is patched. If you upgraded after sshd started, restart it (rc-service sshd restart).We also ran the script through the other paths. With a $6$ user added (made with chpasswd) the package is still reported as patched. For the logic check only, we raised the fixed version in a copy of the script so the package counted as old: with only root's * it printed "at least one condition is not met", and with an extra $6$ user it printed that the conditions appear met. Without sshd installed it stops at "nothing to assess", and as an unprivileged user it reports that sshd -T failed and that /etc/shadow is not readable, instead of drawing a conclusion.
Reading the findings
- libc. musl is a precondition, not a finding by itself.
- Package. Compare the package with the fixed version. The upstream string is only an initial hint.
- Effective settings. Use
sshd -T, not a grep of/etc/ssh/sshd_config.sshd -Tneeds host keys to exist (without them it printssshd: no hostkeys available -- exiting.), and its-Coption takesaddr,user,host,laddr,lportandrdomainso thatMatchblocks are evaluated for a given connection. In sshd_config(5), the first value found for a keyword is the one used, so the order of included files matters. - Accounts. An account with exactly
*, and, separately, an account with a$5$or$6$hash. - Reading. All of the conditions together, plus whether the running daemon was restarted after an upgrade.
Tested. Why a grep of the main file is not an audit: with PasswordAuthentication no and a Match Address 10.0.0.0/8 block setting PermitRootLogin yes in the main file, and an included drop-in with Match User deploy / PasswordAuthentication yes, we got:
| Query | passwordauthentication | permitrootlogin |
|---|---|---|
sshd -T, no context | no | without-password |
sshd -T -C user=deploy,host=h,addr=192.0.2.1 | yes | without-password |
sshd -T -C user=root,host=h,addr=10.1.2.3 | no | yes |
The grep of the main file showed PasswordAuthentication no and PermitRootLogin yes and said nothing about the deploy rule in the drop-in. A localhost -C example is only an illustration: use the user, host name and source address of a real connection.
Why a stock Alpine configuration may reduce exposure, but still needs verification
This section is configuration-based reasoning, not proof that a stock or deployed image is safe.
The manual says PermitRootLogin defaults to prohibit-password, which disables password and keyboard-interactive authentication for root. So on a configuration that keeps the default and has no Match override, root is not reachable by password. Alpine makes the same point, with two limits: root becomes reachable if PermitRootLogin yes is set, and the default does not help if another account that can log in is able to become root, for example through doas.
The default does nothing for the other accounts. Any account with * that is allowed to use a password is a candidate, and PasswordAuthentication yes is the OpenSSH default. The second precondition, an account with a $5$ or $6$ hash, is easy to meet by accident: setting a console password or adding a user with a hashed password is enough. A host can therefore be safe today and exposed after an ordinary admin task. Verify the effective settings and the package, and treat PasswordAuthentication no as the interim mitigation, not as a replacement for the update.
Detect: did anyone already walk in?
Alpine's guidance is to look for Accepted password for lines on an account that has no password (alpine, root or any key-only user), to review doas use and recently created users, files and authorized keys, and to treat the machine as compromised if a login cannot be ruled out. Where the log is depends on the syslog setup and on whether sshd runs in a container.
# Look for accepted password logins on accounts that should never use a password. Adjust the account list.
# Alpine's advisory names /var/log/messages; logread reads BusyBox syslogd's ring buffer when that daemon runs.
for f in /var/log/messages; do [ -r "$f" ] && grep -E 'Accepted password for (root|alpine|deploy|ci) ' "$f"; done
logread 2>/dev/null | grep -E 'Accepted password for (root|alpine|deploy|ci) '
echo "done: no further output above means no matching events in these two sources"Tested: in a container without a running syslog daemon, /var/log was empty and logread printed logread: can't find syslogd buffer: No such file or directory. That is the point of the last line: a quiet result may mean no logging, not no logins. No matching events in a log source does not rule out a compromise. A successful password login for root, or for a key-only account, is a suspicious event that needs investigation, not by itself a proof of compromise.
Remediate
- Update, then restart.
apk upgrade -U -a, thenrc-service sshd restart. Alpine states that upgrading the package does not restart a running sshd. Verify the package with the audit above. - If you cannot update yet, disable password authentication. Set
PasswordAuthentication no(OpenSSH's own advice, repeated by Alpine). Keep your current session open, confirm that a new key login works, then check the result withsshd -T -C user=NAME,host=HOST,addr=IP | grep -i passwordauthenticationfor the accounts that matter, because aMatchblock can turn it back on. Alpine's advisory has a ready-made drop-in andsedcommand; read it before running it. - Treat locking as a different control. Alpine lists locked accounts (
!in the password field) as not affected, because they cannot log in with a password or a key. Tested: a key-only account with*accepted a key login (Accepted publickey), and after its field was changed to!the same key was refused withUser svc not allowed because account is locked. Sopasswd -lis right for an account nobody should use, and wrong for a key-only account you still need. On Alpine 3.22,adduser -Dalready creates accounts as!, andpasswd -lon one printedpassword for svc1 is already locked. Password locking, account status and SSH policy are separate controls, and none replaces the update. - If a login cannot be ruled out, follow Alpine: treat the machine as compromised.
Scope: what is and is not affected
| Statement | Source |
|---|---|
| Not present on non-Linux systems, Linux/glibc systems, or Linux systems that use PAM for password authentication | OpenSSH announcement |
Affected: Alpine openssh-server (no PAM), or openssh-server-pam with UsePAM no, with PasswordAuthentication yes, a * account and a $5$/$6$ account | Alpine advisory |
Not affected: containers that do not run sshd, PasswordAuthentication no, openssh-server-pam with UsePAM yes, locked (!) accounts, hosts with no $-style hash, cloud-init images that write PasswordAuthentication no | Alpine advisory |
| Other musl-based Linux distributions | Not checked: the OpenSSH announcement names Alpine as one example |
| Dropbear is not affected | Reported by The Hacker News only. Not in the OpenSSH or Alpine advisories, and we did not verify it |
These are statements about the configuration the advisories describe, not guarantees for every deployment.
What we tested, and what we did not
- Tested, real output (6 November 2026, throwaway
alpine:3.22containers, release 3.22.8): the stockroot:*, the installed package andsshd -V, theapkcomparison,sshd -Tandsshd -T -Cwith anIncludeandMatchrules, which binary printsusepam, the five-part audit script on every path above,passwd -landadduser -D,logreadwithout syslogd, and a key login with*and with!. The key login used a valid key on a local test sshd, with no password involved. - From the advisories, not reproduced by us: the oversized-password mechanism, its length range, and the precondition list. We installed only the fixed package, so we did not test a vulnerable sshd. No exploit was run.
- Our reasoning, from the manual: that the
prohibit-passworddefault closes the password path for root on a configuration without overrides. - Not verified: Previdian's observations and the other statements credited to The Hacker News, the 256 versus 257 byte detail between the CVE record and Alpine,
openssh-server-pamwithUsePAM yes, Alpine branches other than 3.22,rc-service sshd restarton a real OpenRC host, and other musl distributions.
Related guides
- Troubleshoot SSH connection refused on Linux: checking whether sshd is listening and reachable before changing anything.
- Manage Linux users and groups safely: locking, listing and reviewing accounts.
- Inspect listening ports and sockets with ss: finding which process listens where.
References
- OpenSSH 10.6p2 release notes
- OpenSSH announcement: urgent security release 10.6p2 (openssh-unix-dev)
- OpenSSH commit: avoid password authn bypass
- CVE-2026-123158 record
- Alpine Linux security advisory: openssh-server password authentication bypass
- Alpine security tracker: CVE-2026-123158
- sshd_config(5) and sshd(8)
- The Hacker News: Hackers target the OpenSSH SSHole flaw (secondary)
More from the blog
- ModSecurity CVE-2026-104269: Upload filename Bypass · Security, 2026-11-14
- CVE-2026-114820: eMudhra Java Trust Store Fix · Security, 2026-11-04
- Node2Shell (CVE-2026-111497): Patch and Verify · Security, 2026-11-02
This article is educational information, not incident-response or legal advice. Verify package status with your operating system, hosting, or runtime vendor.