Skip to content

OpenSSH CVE-2026-123158 (SSHole): Patch the Exploited Alpine/musl Password Bypass

CVE-2026-123158 lets attackers log in to Alpine sshd without a password, and CISA lists it as exploited. Check exposure, patch, restart sshd, review logs.

MGMCSA Guru Team November 17, 2026 9 min read
Server terminal with a login prompt and a broken padlock of asterisks, mountain silhouette in the background, dark slate and red

CVE-2026-123158, nicknamed SSHole, lets an attacker log in to sshd on Alpine Linux without a valid password. It affects OpenSSH builds on Linux that use musl libc without PAM, which is exactly how Alpine’s default openssh-server package is built. OpenSSH fixed it in portable OpenSSH 10.6p2 on November 5, 2026, and Alpine shipped patched packages for every branch back to 3.16 the same day.

CISA added CVE-2026-123158 to its Known Exploited Vulnerabilities catalog on November 9, 2026, so exploitation is confirmed. Alpine’s advisory says the attack takes one connection, works every time and needs no retries.

If you run sshd on Alpine, update openssh and restart sshd today. Upgrading the package doesn’t replace the daemon that’s already running. If you can’t update yet, set PasswordAuthentication no and restart sshd. Alpine says either step closes the hole.

What CVE-2026-123158 does

When sshd is built without PAM, it checks a password by hashing the attempt with crypt() and comparing the result with the stored password field. Alpine’s advisory walks through the failure step by step:

  1. An account with no password set has * as its password field. That’s normal for key-only accounts.
  2. The * field is too short to hold a salt, so sshd borrows the salt from another account that has a real $5$ or $6$ hash.
  3. The attacker sends a very long password. musl’s crypt() treats a key over 256 bytes as an error and returns the string *.
  4. sshd compares that * with the stored * field. They match, and the login succeeds.

The CVE record describes the same bug as a misinterpretation of whether a string is a password hash, and says any password between 256 and 1024 characters succeeds for some account configurations. Alpine gives the range as 257 to 1024 bytes. Both point at the same thing: a password just over 256 bytes.

OpenSSH and Alpine both say the root cause sits outside sshd, in how musl’s crypt() reports errors. OpenSSH’s fix commit is titled “avoid password authn bypass” and works around it inside sshd.

CVE-2026-123158 at a glance

Product Portable OpenSSH sshd on Linux, musl libc, no PAM
Affected Before 10.6p2 (CVE record)
Fixed upstream OpenSSH 10.6p2, released 2026-11-05
CVSS 3.1 8.1 High, AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (CNA score)
Weakness CWE-394 Unexpected Status Code or Return Value
CISA KEV Added 2026-11-09, federal due date 2026-11-12
Reported by Özgün Kültekin of Wakefield

Are you affected? Four conditions

Alpine lists the conditions. You’re exposed only if all of them hold:

  • No PAM in sshd. You run Alpine’s openssh-server, which is built without PAM, or openssh-server-pam with UsePAM no.
  • Password logins on. PasswordAuthentication is yes, which is the OpenSSH default unless you changed it.
  • A * account exists. That includes root, which ships as root:* in the base image since about Alpine 3.16, any key-only user created with adduser without a password or with usermod -p '*', directory users coming through musl-nscd (nslcd, winbind, sssd), and the alpine user in the official tiny-cloud images.
  • One real hash exists. At least one local account has a $5$ or $6$ password hash. Alpine says one user with a password is enough to make every account without one reachable.

Root gets some protection from the defaults. OpenSSH’s default PermitRootLogin prohibit-password keeps root out unless PermitRootLogin yes is set. Alpine points out that this doesn’t help when another account that can log in can become root, for example through doas.

Alpine lists who is not affected: containers that don’t run sshd, systems with PasswordAuthentication no, openssh-server-pam with UsePAM yes, locked accounts with ! in /etc/shadow, systems where no account has a $-style hash, and cloud images configured through cloud-init, which writes PasswordAuthentication no.

CVE-2026-123158 doesn’t apply to glibc distributions such as Debian, Ubuntu or RHEL, or to PAM-enabled builds. The CVE record scopes it to Linux builds that use musl libc without PAM.

Check a host in a few commands

Run these as root on the Alpine host. First, the installed package revision, which is what you compare against Alpine’s fixed-version table (the stable branches carry a backported patch, so the upstream version number alone won’t tell you):

apk info -v openssh-server openssh-server-pam 2>/dev/null

Next, the settings sshd is actually using:

sshd -T | grep -iE 'passwordauthentication|usepam|permitrootlogin'

Then the two account conditions: which accounts have a * password field, and how many have a $5$ or $6$ hash:

awk -F: '$2=="*"{print $1}' /etc/shadow
grep -cE '^[^:]*:\$[56]\$' /etc/shadow

If the first awk command lists accounts, the grep count is 1 or more, and sshd -T shows passwordauthentication yes with no PAM, the host matches Alpine’s affected conditions until the package is fixed. Directory users from musl-nscd won’t show in /etc/shadow, so check them separately if you use nslcd, winbind or sssd.

Patch CVE-2026-123158 on Alpine

Alpine’s fix is a package update, then a restart of the running daemon:

apk upgrade -U -a
rc-service sshd restart

Alpine 3.21.10, 3.22.8, 3.23.8 and 3.24.4 contain the fixed package. The stable branches carry a backported patch, not OpenSSH 10.6p2, so don’t expect sshd -V on 3.24 to report 10.6p2.

Alpine branchFixed openssh version
edge10.6_p2-r0
3.2410.3_p1-r2
3.2310.2_p1-r1
3.2210.0_p1-r11
3.21 (end of support 2026-11-01)9.9_p2-r1
3.209.7_p1-r6
3.199.6_p1-r3
3.189.3_p2-r4
3.179.1_p1-r7
3.169.0_p1-r6

Alpine published fixed packages for 3.16 to 3.21 even though those releases no longer get regular updates. If you build portable OpenSSH yourself against musl, upgrade to 10.6p2, which includes fix commit 4353fdc.

For tiny-cloud instances, images built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 and later include the fixed package. Running instances from earlier images keep the old package until you update openssh on each one or disable password authentication.

Alpine says containers that don’t run sshd aren’t affected. For the ones that do, rebuild the image on a patched Alpine base so the fix survives the next redeploy; our Docker security best practices explain why rebuilding on an updated base beats patching inside a running container.

If you can’t update yet: turn off password logins

Before you change anything, make sure key login works and keep your current SSH session open until you’ve tested a new login. Alpine’s advisory gives these commands, run as root:

mkdir -p /etc/ssh/sshd_config.d
echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf
sed -i.bak -e '1i PasswordAuthentication no' \
  -e 's/^\(\s*PasswordAuthentication[^y#]*\)yes/\1no/i' \
  /etc/ssh/sshd_config
sshd -t && rc-service sshd restart
sshd -T | grep -i passwordauthentication

The first two commands create a drop-in file, which Alpine’s default sshd_config reads from 3.19 onward. Older releases ignore the drop-in folder, which is why the sed line also edits /etc/ssh/sshd_config directly. It flips every PasswordAuthentication yes to no, including lines inside Match blocks, adds PasswordAuthentication no at the top, and saves the original as /etc/ssh/sshd_config.bak.

The last command should print passwordauthentication no. To undo the change, delete /etc/ssh/sshd_config.d/00-no-passwords.conf and copy /etc/ssh/sshd_config.bak back over /etc/ssh/sshd_config.

Check for signs of a break-in

CISA’s KEV entry marks CVE-2026-123158 for forensic triage, so patching isn’t the end of the job on exposed hosts. Alpine’s advisory says to look in /var/log/messages for sshd lines reading Accepted password for an account that has no password, such as alpine, root or any key-only user:

grep 'sshd' /var/log/messages | grep 'Accepted password for'

Then review doas use and recently created users, files and authorized keys on exposed machines. Our write-up of the malicious Claude Code extension SSH backdoor shows what an attacker-added key in authorized_keys looks like in practice. Alpine’s guidance is direct: if you can’t rule out a login, treat the machine as compromised.

CVE-2026-123158 response checklist

  • List every Alpine or musl host and container that runs sshd
  • Run apk upgrade -U -a and confirm the fixed openssh revision for the branch
  • Restart sshd with rc-service sshd restart
  • Or set PasswordAuthentication no, run sshd -t, restart and check sshd -T
  • Update running tiny-cloud instances built from 3.18.11 to 3.24.3 images
  • Search /var/log/messages for Accepted password lines on passwordless accounts
  • Review doas use, new users, files and authorized_keys on exposed hosts

Exploitation and timeline

CISA’s KEV catalog lists CVE-2026-123158 as “OpenBSD OpenSSH Unexpected Status Code or Return Value Vulnerability”, added November 9, 2026, with a due date of November 12, 2026 for US federal civilian agencies. Ransomware use is listed as unknown. The due date binds US federal agencies only. The CVE record already links public reproduction repositories, so waiting for a deadline buys nothing.

GreyNoise, a third-party threat intelligence company, reports public exploit code since November 5 and the first successful exploitation of one of its sensors on November 7, 2026 at 00:46 UTC. That’s GreyNoise’s telemetry, not a CISA or vendor finding.

DateEvent
2026-11-05OpenSSH 10.6p2 released; Alpine advisory and fixed packages; CVE published
2026-11-07GreyNoise reports first successful exploitation of one of its sensors
2026-11-09CISA adds CVE-2026-123158 to KEV
2026-11-12KEV due date for US federal civilian agencies

What to do now

The fix for CVE-2026-123158 is two commands: apk upgrade -U -a, then rc-service sshd restart. The restart matters because the package upgrade leaves the old sshd process running with the vulnerable code. Where you can’t patch today, PasswordAuthentication no closes the same hole.

Then check the logs. GreyNoise saw its first successful exploitation two days after disclosure, so any Alpine host with sshd reachable from the internet since November 5 needs its Accepted password for lines and user accounts reviewed.

Frequently asked questions

Does CVE-2026-123158 affect Ubuntu, Debian or RHEL?

No. The CVE record scopes it to OpenSSH sshd on Linux built with musl libc and without PAM. glibc distributions such as Debian, Ubuntu and RHEL, and PAM-enabled builds, are outside that scope.

Which Alpine openssh version fixes CVE-2026-123158?

Alpine lists 10.6_p2-r0 for edge, 10.3_p1-r2 for 3.24, 10.2_p1-r1 for 3.23, 10.0_p1-r11 for 3.22 and 9.9_p2-r1 for 3.21, with fixed packages back to 3.16. Point releases 3.21.10, 3.22.8, 3.23.8 and 3.24.4 include the fix.

Do I need to restart sshd after updating?

Yes. Alpine says upgrading the package does not restart the running sshd. Run rc-service sshd restart after apk upgrade -U -a, or the old daemon keeps running.

Are Alpine Docker containers affected by CVE-2026-123158?

Only containers that run sshd. Alpine says Docker and other container users that do not run sshd in the container are not affected.

How do I mitigate CVE-2026-123158 without updating?

Set PasswordAuthentication no in your sshd configuration, check it with sshd -t, and restart sshd. Alpine's advisory gives a drop-in file and a sed command that also covers Match blocks, and says this closes the hole on its own.

Is CVE-2026-123158 being exploited?

Yes. CISA added it to the Known Exploited Vulnerabilities catalog on November 9, 2026 and marked it for forensic triage. GreyNoise, a third party, reports successful exploitation of one of its sensors on November 7, 2026.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.