Home/Blog/OpenSSH on Alpine Linux: CVE-2026-123158 opens the root account
LinuxHigh

OpenSSH on Alpine Linux: CVE-2026-123158 opens the root account

On Alpine Linux servers a very long password can open an account that never had a password at all, root included. CISA has added the flaw to its catalogue of actively exploited vulnerabilities, and working exploits are public.

Published: · Vulnerabilities: CVE-2026-123158

Hand holding a smartphone in a bright office with plants

A long password instead of none

CVE-2026-123158, named “SSHole” by its discoverer, affects the OpenSSH server (sshd) on Linux with the musl library, running without PAM. The main example is Alpine Linux, but systems built on OpenWrt, Buildroot or Yocto, which often means routers and embedded devices, can meet the same conditions.

The mechanism is simple. Without PAM, sshd checks a password by hashing it with crypt() and comparing the result with the entry in /etc/shadow. For a password longer than 256 bytes, musl returns the character * as an error. The same character in the shadow file marks an account without a password. The comparison matches and sshd lets the attacker in. One connection and a password of roughly 257 to 1024 characters is enough.

Who is really exposed

According to the Alpine advisory, four conditions must all be met:

  • sshd built without PAM (the default openssh-server package), or openssh-server-pam with UsePAM no,
  • password login enabled (PasswordAuthentication yes, the OpenSSH default),
  • at least one account with * in the password field: root on Alpine since about version 3.16, key-only users, the alpine user in tiny-cloud images,
  • at least one local account with a password stored as $5$ or $6$.

Not at risk: Debian, Ubuntu, Fedora and Red Hat (glibc and PAM), accounts locked with !, servers with password login disabled. Alpine-based Docker containers are not at risk unless they run sshd.

The flaw has a CVSS score of 8.1. CISA added it to the KEV catalogue on 9 November 2026, and public repositories with a working exploit are available. In our view, every internet-facing server that meets the conditions above should be fixed immediately, without waiting for a maintenance window. Machines reachable only from the internal network can wait a few days, provided password login is disabled in the meantime.

Fixed versions

The OpenSSH project released version 10.6p2 with a workaround on 5 November. Alpine released fixed openssh packages:

  • edge: 10.6_p2-r0,
  • 3.24: 10.3_p1-r2 (release 3.24.4),
  • 3.23: 10.2_p1-r1 (release 3.23.8),
  • 3.22: 10.0_p1-r11 (release 3.22.8),
  • 3.21: 9.9_p2-r1 (release 3.21.10),
  • older, unsupported: 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.

How to check a server

  • package version: apk info -v openssh-server,
  • effective configuration: sshd -T | grep -iE 'passwordauthentication|usepam',
  • accounts without a password: awk -F: '$2=="*"{print $1}' /etc/shadow,
  • accounts with a $5$/$6$ password: awk -F: '$2 ~ /^[$][56][$]/{print $1}' /etc/shadow.

It is also worth reviewing places that are easy to forget: virtual machines built from Alpine cloud images (tiny-cloud images from 3.18.11 to 3.24.3 ship an alpine user with no password and passwordless doas), containers with their own sshd for remote maintenance, and OpenWrt network devices.

What to do

  1. Update packages: apk upgrade -U -a, then restart sshd (rc-service sshd restart). The upgrade alone does not restart the running service.
  2. If updating is not possible right away: make sure key login works, keep the current session open and disable passwords with PasswordAuthentication no in /etc/ssh/sshd_config.d/00-no-passwords.conf, then run sshd -t && rc-service sshd restart.
  3. Check the logs: grep 'Accepted password for' /var/log/messages. A successful password login to root, alpine or a key-only account is a sign of intrusion.
  4. Review new users, changes to authorized_keys, use of doas and new files. If unauthorised login cannot be ruled out, treat the machine as compromised and rebuild it from a trusted source.

The longer-term lesson

This flaw mostly hits servers and devices few people remember: small cloud machines, test images, routers. Password login over SSH on internet-facing servers should not be a default setting. We recommend keeping an inventory of systems with their versions and adopting a rule that administrative access uses keys only, ideally over a VPN. Then the next flaw of this kind calls for an update, not an emergency.

Sources

The information in this post comes from the sources below. Each link was checked before publication.

  1. OpenSSH: release notes 10.6p2
  2. Alpine Linux: openssh-server password authentication bypass
  3. NVD: CVE-2026-123158
  4. CISA KEV: CVE-2026-123158
  5. SecurityWeek

Ongoing IT care

As part of ongoing IT care we keep systems up to date and respond to new vulnerabilities before they are exploited.

Book a consultation