
Audit & interim mitigation for CVE-2026-123158 (*SSHole) — OpenSSH password bypass on musl/Alpine — across Docker containers, images and host
Audit and interim-mitigation tool for CVE-2026-123158 ("*SSHole"), an OpenSSH password authentication bypass on musl-based Linux (Alpine). It covers your running Docker containers, local images and the host.
Example output (abridged, from a test machine):
$ sudo ./sshole-check.sh --images
CVE-2026-123158 (*SSHole) audit · sshole-check 1.0.0 · 2026-11-05 22:45:52 UTC
[VULN ] container sshole-real ghcr.io/requarks/wiki:2.5
OpenSSH 10.3p1 · openssh-server-10.3_p1-r1 openssh-server-common-10.3_p1-r1 · alpine 3.24.3
PasswordAuthentication=yes · PAM=off · PermitRootLogin=prohibit-password · port: 22
'*' accounts: root carol · $5$/$6$ hashed: bob
sshd running: yes · published: 22→0.0.0.0:33776 [::]:33776
→ unpatched (package older than 10.3_p1-r2, the Alpine 3.24 fix) and all conditions are met
· root is '*' but PermitRootLogin=prohibit-password, root cannot log in with a password
· sshd is running and published to the outside
[WARN ] image docker.gitea.com/gitea:1.24.4 dd29b53ab011
OpenSSH 10.0p2 · openssh-server-10.0_p1-r7 openssh-server-common-10.0_p1-r7 · alpine 3.22.1
PasswordAuthentication=yes · PAM=off · PermitRootLogin=without-password · port: 22
'*' accounts: root git · $5$/$6$ hashed: -
EXPOSE 22/tcp 3000/tcp
→ unpatched (package older than 10.0_p1-r11, the Alpine 3.22 fix); conditions not met right now, becomes exploitable once an account gets a password
[OK ] container postgres postgres:16-alpine
no sshd
Summary: OK=339 WARN=8 VULN=1 BREACH=0 SKIPPED=11
It never tries to log in. The probe only reads the sshd binary,
sshd -T/sshd_config,/etc/shadow, the apk database and log files inside each target. Read the script before running it; it is a single file of plain bash and POSIX sh.
curl -fsSLO https://raw.githubusercontent.com/ersinkoc/sshole-check/main/sshole-check.sh
less sshole-check.sh # read it first
chmod +x sshole-check.sh
sudo ./sshole-check.sh # running containers + host
sudo ./sshole-check.sh --images # also every local image
Requirements: bash on the machine that runs it, plus access to the Docker (or Podman) CLI. The targets only need /bin/sh. Images with no shell, such as distroless or scratch images, are reported as SKIP; they cannot run sshd anyway.
| Name | *SSHole / "sshhole" |
| Component | OpenSSH sshd, password authentication without PAM |
| Platform | Linux + musl libc (Alpine, also OpenWrt / Buildroot / Yocto builds) |
| Fixed in | OpenSSH 10.6p2 (2026-11-05), plus Alpine backports to every branch from 3.16 on |
| CVSS 3.1 | 8.1 High, AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CWE | CWE-394 (Unexpected Status Code or Return Value) |
| GHSA | GHSA-4fcc-vm97-gx3x |
| Reported by | Özgün Kültekin (Wakefield) |
Three behaviours that are each reasonable on their own add up to a login bypass:
crypt() returns "*" on failure. Since 2012 musl returns a failure string instead of NULL. Its SHA-crypt implementation refuses keys longer than 256 bytes (KEY_MAX, a DoS guard), so a password longer than 256 bytes hashes to the literal string *.$5$/$6$ hash so that timing looks the same. That is why a second, password-protected account is needed.root:*. Since Alpine 3.16 (2022), * is the "no password, keys only" marker for root. The same marker is used for key-only users, directory-service users (nslcd, sssd, winbind) and the alpine user in tiny-cloud images.Without PAM, sshd compares crypt(password, borrowed_salt) with the stored field. For a 257 to 1024 byte password that is "*" == "*", and the login is accepted.
OpenSSH 10.6p2 works around it by rejecting stored hashes that are too short to be valid. The underlying behaviour in musl is unchanged; the fix is in sshd.
sshd is OpenSSH < 10.6p2 without the Alpine backport, linked against muslopenssh-server package, or openssh-server-pam with UsePAM noPasswordAuthentication yes (the default)* (a ! lock is not affected)$5$ or $6$ hashRoot itself is only reachable with PermitRootLogin yes; the default prohibit-password blocks password logins for root. On Alpine's AWS/Azure tiny-cloud images, though, the * user alpine has passwordless doas, so getting in as alpine means getting root.
Not affected: glibc distributions (Debian, Ubuntu, RHEL, Fedora …), UsePAM yes, PasswordAuthentication no, containers that don't run sshd, Dropbear, and OpenBSD's sshd.
| Alpine branch | First fixed openssh | Fixed point release |
|---|---|---|
| edge | 10.6_p2-r0 | – |
| 3.24 | 10.3_p1-r2 | 3.24.4 |
| 3.23 | 10.2_p1-r1 | 3.23.8 |
| 3.22 | 10.0_p1-r11 | 3.22.8 |
| 3.21 | 9.9_p2-r1 | 3.21.10 |
| 3.20 | 9.7_p1-r6 | (EOL, package only) |
| 3.19 | 9.6_p1-r3 | (EOL, package only) |
| 3.18 | 9.3_p2-r4 | (EOL, package only) |
| 3.17 | 9.1_p1-r7 | (EOL, package only) |
| 3.16 | 9.0_p1-r6 | (EOL, package only) |
Alpine backported the fix, so most branches keep their old upstream version: a fixed 3.24 box still reports OpenSSH_10.3p1. sshd -V alone cannot tell you whether you are patched. That is why this tool compares the apk package release against the table above.
apk upgrade on a running container is lost when the container is recreated. The image is what you have to fix.alpine:3.22.1, FROM node:20-alpine@sha256:…) keep the vulnerable package forever, and a rebuild with cache can reuse the old apk add layer.$6$ account yet) and still become exploitable as soon as an entrypoint script runs chpasswd. sshole-check reports this as WARN.--network host, or with -p 22:22 / -p 2222:22, puts the bug on the network. sshole-check shows the published mapping for each container.For every target it runs a small POSIX sh probe inside it. Containers are probed with docker exec -u 0. Images are started with docker run --rm --network none --entrypoint sh -u 0. The host is probed directly.