Year-end offer: 30% off your first 6 months. Order by 31 December.

OpenSSH password bypass (CVE-2026-123158): is your server affected?

A bug in OpenSSH lets an attacker log in with any long password on some Linux systems, and it is being used in attacks. The good news: the usual Ubuntu, Debian and Red Hat packages are not affected. Here's who is, how to check, and what to do.

Short version: on a normal Ubuntu, Debian, RHEL, Rocky Linux or AlmaLinux server, the OpenSSH package is not affected. Systems that use the musl C library without PAM are, for example Alpine Linux, which is common in Docker images. If you run an SSH server on Alpine, update openssh-server and restart it today, or turn off password logins.

What happened

On 5 November 2026 the OpenSSH project released OpenSSH 10.6p2. Its release notes say it avoids a "password authentication bypass" in the SSH server on "some Linux systems" that run without PAM, the login module most Linux systems use. The project says the root cause is outside OpenSSH, but it can be exploited through it.

The official description (NVD, CVE-2026-123158) says that on Linux with the musl C library and without PAM, "for some configurations of accounts, any password between 256 and 1024 characters succeeds". In other words, a long random password can be enough to get in.

On 9 November 2026 the US agency CISA added it to its list of vulnerabilities used in attacks (the KEV catalog).

Who is affected

Alpine Linux, which uses musl, published the exact conditions. You are affected only if all of these are true:

  • you run the openssh-server package, or openssh-server-pam with UsePAM no;
  • password logins are on (PasswordAuthentication yes);
  • the system has an account with a * in its password field;
  • at least one local account has a $5$ or $6$ password hash.

With openssh-server-pam and UsePAM yes, Alpine says you are not affected. Alpine checked every release from 3.16 to 3.24 and edge: all were affected before the fix.

What the big distributions say

SystemStatus of the OpenSSH package
Ubuntu 22.04, 24.04 and 26.04 LTSNot affected. Ubuntu builds OpenSSH with glibc and PAM.
Debian 12 and 13Debian's packages are not affected (urgency "unimportant"). Debian's tracker still lists 12 and 13 as "vulnerable" because the source code lacks the fix, but its note says the built packages don't have the problem. Debian unstable has the upstream fix in 1:10.6p2-1.
Red Hat Enterprise LinuxNot affected. Red Hat builds against glibc and uses PAM.
Rocky Linux and AlmaLinuxWe found no notice of their own for this CVE. Both are built from Red Hat's sources and use glibc and PAM, like RHEL.
Alpine LinuxAffected. Fixed in openssh 10.6_p2-r0 (edge), 10.3_p1-r2 (3.24), 10.2_p1-r1 (3.23), 10.0_p1-r11 (3.22) and 9.9_p2-r1 (3.21).

The upstream fix is OpenSSH 10.6p2. Distributions often add fixes to an older version number instead, so the number from ssh -V alone doesn't tell you if you're safe. Compare the package version with your distribution's notice.

1. Check your server

First, which C library and which OpenSSH package you have:

ldd --version 2>&1 | head -n1     # "GLIBC" = glibc, "musl libc" = musl
ssh -V

# Ubuntu / Debian
dpkg -l openssh-server
# RHEL / Rocky / Alma
rpm -q openssh-server
# Alpine
apk list --installed | grep openssh

Then check how the SSH server is set up (run as root):

sudo sshd -T | grep -iE '^(usepam|passwordauthentication) '

If you see glibc and usepam yes, as on a normal Ubuntu, Debian or RHEL server, this bug doesn't reach you. Keep reading for the general tips anyway: SSH is the door most attacks knock on.

Docker and other containers: many images are based on Alpine. If a container runs its own SSH server (some deploy tools and "SSH into the container" images do), check it too:

docker ps --format '{{.Names}}  {{.Image}}'
docker exec NAME sh -c 'apk list --installed 2>/dev/null | grep openssh-server'

2. Fix it (Alpine and other musl systems)

apk update && apk upgrade openssh
rc-service sshd restart

Alpine notes that updating the package alone doesn't replace the SSH server that is already running, so the restart matters. For a container, rebuild it from an updated image.

If you can't update yet, Alpine's workaround is to turn off password logins: set PasswordAuthentication no in /etc/ssh/sshd_config and restart the SSH server. Make sure your SSH key works first.

Alpine also says to look in /var/log/messages for "Accepted password for" lines for accounts that have no password, and to treat the machine as hacked if you can't rule out such a login. Our guide on first steps after a hack helps there.

Updating OpenSSH on Ubuntu, Debian and RHEL

You don't need to rush for this bug, but OpenSSH updates do come out for other holes. To install the latest package:

# Ubuntu / Debian
sudo apt update && sudo apt install --only-upgrade openssh-server
# RHEL / Rocky / Alma
sudo dnf upgrade openssh-server

Restart the SSH server safely, so a mistake can't lock you out:

  1. Keep your current SSH session open the whole time. A restart doesn't close it.
  2. Test the config: sudo sshd -t. No output means it's fine.
  3. Restart: sudo systemctl restart ssh on Ubuntu and Debian, sudo systemctl restart sshd on RHEL, Rocky and Alma.
  4. Open a second terminal and log in again. Only close the first session when that works.

If the second login fails, use the open session to undo your change. See fixing SSH "permission denied" and "connection refused".

What else lowers the risk

How ServerNest helps

ServerNest supports Ubuntu and Debian, with Rocky Linux and AlmaLinux in preview. None of these is affected by this bug, and ServerNest doesn't manage Alpine or the inside of your containers. For the server itself, these switches in the dashboard work today:

  • Safer SSH logins: turn off password logins and root logins. If something goes wrong, the old settings come back within two minutes.
  • Automatic security updates: security updates for the system, OpenSSH included, are installed for you. On every plan.
  • Firewall and fail2ban: only the ports you choose are open, and addresses that keep guessing passwords are blocked.
  • Alerts: urgent problems reach you by email or chat.

More on the security features page.

Official sources

All checked on 26 November 2026.

Also this month: Drupal security updates (two holes used in attacks) and PHP security fixes.

← Back to the security blog