← All news

Security alert · 5 Nov 2026

OpenSSH password bypass on Alpine and musl: update and restart sshd

CVE-2026-123158 lets an attacker log in over SSH without the right password on Linux systems that use musl libc and run sshd without PAM. Who is affected, the fixed versions, and what to check.

Last verified
5 Nov 2026
CVE
CVE-2026-123158
Status
Fixed in OpenSSH 10.6p2 and in Alpine packages for 3.16 to 3.24 and edge. Restart sshd after the update. We found no reports of exploitation in the wild.

What happened

On 5 November 2026 the OpenSSH project released 10.6p2 with what it calls a critical security workaround for Linux systems that use musl libc and run sshd with PAM disabled. It fixes a password authentication bypass in sshd. OpenSSH says the root cause is outside sshd, but sshd can avoid it.

The flaw is tracked as CVE-2026-123158. The CVE record gives it CVSS 8.1 (High) and says that for some account setups, any password between 256 and 1024 characters is accepted. An example of a platform with musl and no PAM is Alpine Linux. At the time of writing the National Vulnerability Database had not added its own score. We found no report of exploitation in the wild.

Alpine published its own advisory the same day. It describes the attack as one connection with no retries. The attacker needs the name of an account whose password field is *, which is normal for key-only users. The machine also needs at least one other account with a real password hash. Then a password of 257 to 1024 bytes lets the attacker in.

Who is affected

Alpine lists these conditions. You are affected if all of them are true:

  • You run Alpine’s openssh-server package, which is built without PAM, or openssh-server-pam with UsePAM no. openssh-server-pam with UsePAM yes is not affected.
  • PasswordAuthentication is yes, which is the OpenSSH default.
  • The machine has an account whose password field is *. This includes key-only users, users that come from a directory service through musl-nscd, and root in the base image since about Alpine 3.16. By default OpenSSH does not allow root to log in with a password, but that does not help if another account that can log in is able to become root, for example through doas.
  • At least one local account has a $5$ or $6$ password hash.

Not affected, according to Alpine: containers that do not run sshd, systems with PasswordAuthentication no, locked accounts with ! in the password field, and cloud images set up through cloud-init, which writes PasswordAuthentication no.

Official Alpine cloud images need a second look. The tiny-cloud images (qcow2, VHD and AMI) from 3.18.11 through 3.24.3 ship an alpine user with a * password and passwordless doas. They are safe on first boot. They become exploitable once any $6$ hash exists on the machine, for example when an admin sets a console password or user-data adds a user with a hashed password. The attacker then gets a shell as alpine and can use doas to become root. Images built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 and later carry the fix. Update every running instance from earlier images.

Other distributions that use musl, such as OpenWrt, Buildroot and Yocto, fit the OpenSSH description when sshd runs without PAM. We did not find a separate advisory for them, so check your own build.

Fixed versions

OpenSSH 10.6p2 fixes sshd. Alpine also patched the older OpenSSH versions in its stable branches:

Alpine branch Fixed openssh package
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 reached its end of support on 1 November 2026, and Alpine still published fixes back to 3.16.

What to do now

1. Find every sshd on musl. Alpine hosts, VMs, cloud images, appliances and routers. Containers that do not run sshd are not affected.

sshd -T | grep -i -E "passwordauthentication|usepam"
apk info -v openssh-server

2. Update and restart. Upgrading the package does not restart a running sshd.

apk upgrade -U -a
rc-service sshd restart

3. If you cannot update yet, turn off password logins. Make sure your key login works first and keep your current session open until you have tested a new login. Alpine says either the update or this step closes the hole.

mkdir -p /etc/ssh/sshd_config.d
echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf
sshd -t && rc-service sshd restart
sshd -T | grep -i passwordauthentication

The last command should print passwordauthentication no. Alpine’s default configuration reads the sshd_config.d folder from 3.19 on, and older releases ignore it. On those, or if a PasswordAuthentication yes line sits in a Match block, use the longer sed command in Alpine’s advisory.

4. Check whether someone got in. Look in /var/log/messages for sshd lines that say Accepted password for an account that has no password, such as alpine, root or any key-only user. Review doas use and recently created users, files and authorized keys on exposed machines. If you cannot rule out a login, treat the machine as compromised.

5. Keep SSH off the open internet where you can. Put it behind a VPN or a bastion host and allow only the networks that need it. A login bug like this one matters much less to an attacker who cannot reach the port.

How we can help

We find every SSH entry point in your cloud and on-prem estate, including images and appliances nobody remembers, move them to patched versions and close password logins for good. Book a call from the button below.

Sources

  1. OpenSSH release notes: 10.6p2 (5 November 2026)
  2. Alpine Linux: Security advisory, openssh-server password authentication bypass
  3. CVE record: CVE-2026-123158

Tell us what's slowing you down.

A 30-minute call with a senior engineer. You leave with a clear next step, whether or not that step is us.

Book a call