Events Secure.com at Black Hat USA 2026

A Very Long Password Opens Locked Accounts on Alpine Linux Servers

An OpenSSH password bypass lets a very long password log in to no-password accounts on Alpine Linux servers. See who's exposed.

OpenSSH Patches a Login Bypass Hiding in Alpine’s C Library

A fix went out on Thursday, 5 November, for a flaw that lets anyone who can reach a Linux server’s login port sign in to accounts that never require a password. The trick is a very long password.

Who should care: any team running Alpine Linux, the small Linux behind many cloud servers, containers, and network devices, with password logins switched on.

What could go wrong: an attacker who can reach the login port gets into an account that should refuse every password. On Alpine’s official cloud images, that account can act as administrator.

Do this today: turn off password logins on those machines, or install the fixed package and restart the login service.

Worth remembering: a rule like “this account takes no password” only holds if every program that checks it reads it the same way.

What Happened?

OpenSSH shipped version 10.6p2 on 5 November to stop an OpenSSH password bypass reachable through sshd, and says the root cause sits outside sshd itself. Alpine published its advisory and fixed packages for every release from 3.16 to edge the same day. MITRE assigned CVE-2026-123158 later that day and rates it 8.1 (High).

Here’s the bug. On musl, the C library under Alpine, the password hashing function refuses anything over 256 bytes and returns a single asterisk as its error. Accounts with no password store that same asterisk. Send a password of 257 to 1,024 bytes, and sshd matches it.

Four things must line up: sshd checking passwords without PAM (Alpine’s default build), password logins on (the default), an account with an asterisk for a password, and at least one other account with a real password hash. Debian, Ubuntu, Fedora, and PAM setups are not affected.

Alpine Linux · OpenSSH

Four conditions. Break one and the long password fails.

The bypass only works when all four line up on the same machine. Three of them are defaults or leftovers. One is a single setting you can check across every server, image and device.

01 · THE SETTING
Password logins are on
PasswordAuthentication yes is the OpenSSH default.
Turn this off fleet wide
02 · THE BUILD
sshd checks passwords without PAM
How Alpine’s default openssh-server package is built, on musl.
03 · THE TARGET
An account with * as its password
Key only users, directory users, the default alpine cloud user.
04 · THE TRIGGER
One other account with a real password
Any $5$ or $6$ hash on the machine.

Debian, Ubuntu, Fedora and PAM based logins are not affected. Containers that never run sshd are not affected either.

What’s the Impact?

Official Alpine cloud images from 3.18.11 through 3.24.3 ship an alpine user with no password and passwordless doas, so it can become root. Once any account on that machine gets a real password, one login attempt can hand over the server. No attacks have been reported.

Where “Just Upgrade” Stops Working

Upgrading fixes machines that have a package manager. Most of this code lives elsewhere.

Container images keep the old package until someone rebuilds them. Cloud images from earlier point releases boot unpatched. Routers and appliances built on OpenWrt, Buildroot or Yocto wait on vendor firmware. Alpine releases older than 3.16 get no fixed package at all. Even patched Alpine hosts can fool a scanner, because the fixed packages keep older version numbers (3.24 ships 10.3_p1-r2).

Where the fix actually lands

“Just upgrade” reaches one place. This code lives in five.

A package upgrade fixes a server that has a package manager. Everywhere else, exposure ends only when the image is rebuilt or the vendor ships firmware.

Alpine servers you manage
Upgrade openssh, then restart sshd. The upgrade alone keeps the old daemon running.
Upgrade + restart
Container images
The old package stays baked in until the image is rebuilt and redeployed.
Rebuild image
Cloud images
Builds before 3.21.10, 3.22.8, 3.23.8 and 3.24.4 boot unpatched. Update each running instance.
Patch each instance
Routers and appliances
OpenWrt, Buildroot and Yocto devices wait on the vendor.
Wait for firmware
Alpine before 3.16
No fixed package exists for these releases.
No package
The one control that works everywhere
Switch password logins off
PasswordAuthentication no

Cycode tested public Docker Hub images that run an SSH server and found a small number exposed under their documented setup, while Gitea, Gogs, and several other popular images ship with password logins off.

So the fleet-wide question is “is password login off?“ and not “which OpenSSH version is this?”

How to Avoid This

Fixed openssh packages · 5 Nov 2026

Patched hosts can still look vulnerable.

Alpine backported the fix to every branch from 3.16 to edge without moving to 10.6p2. A scanner that only reads the upstream version number will get these wrong. Match each host against its branch.

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
Supported branchNo longer gets regular updates, fix published anyway
After upgradingRestart the daemon or the old code keeps running: apk upgrade -U -a then rc-service sshd restart. Older than 3.16? There is no package. Set PasswordAuthentication no.
  • Find every machine, image and device running OpenSSH on Alpine or another musl system with password logins on.
  • Turn password logins off, or update OpenSSH and restart sshd. The upgrade alone leaves the old daemon running.
  • Rebuild and redeploy container images, and update instances launched from older cloud images.
  • Search /var/log/messages for “Accepted password for” on accounts with no password, such as alpine, root or users meant for key logins only. If you find one, treat the machine as compromised, as Alpine advises.
  • On Alpine older than 3.16, turning off password logins is the only fix.