OpenSSH 10.6p2 password bypass CVE-2026-123158: check Alpine sshd
CVE-2026-123158 (OpenSSH 10.6p2) is a password authentication bypass in Linux sshd built without PAM. On Alpine, install the fixed package and restart sshd.
The password authentication bypass fixed in OpenSSH 10.6p2 (2026-11-05) affects some Linux sshd builds that are built and run without PAM, and Alpine is affected because its default openssh-server package is built without PAM. Install the fixed package and restart sshd; if you cannot update yet, set PasswordAuthentication no.
[1] Start with what the advisory actually covers. The release notes say it in two places.
This release contains a critical security workaround that affectsLinux systems that use the musl libc and PAM disabled. * sshd(8): avoid password authentication bypass that is exploitable through sshd(8) that affects some Linux systems when built and run with PAM support disabled. We consider the root cause of this bug to be outside sshd, but it is exploitable via sshd and can be avoided there.The release notes carry no CVE ID. The ID comes from the CVE record published the same day (CVSS 3.1 8.1 HIGH), which describes "musl libc is used without PAM" and names Alpine Linux as an example. Neither document mentions glibc. Distribution pages as read on 2026-11-07:
| Source | Date | What it says |
|---|---|---|
| Alpine advisory | 2026-11-05 | 3.16 to 3.24 and edge affected, fixed version per branch |
| Alpine security DB | read 2026-11-07 | edge and 3.24 to 3.19 marked fixed, description empty |
| Ubuntu | 6 November 2026 | Priority Medium, openssh Needs evaluation on 14.04 to 26.10 |
| Debian | read 2026-11-07 | sid 1:10.6p2-1 fixed, urgency unimportant, bookworm, trixie and forky shown as vulnerable |
The Ubuntu and Debian entries mean "not triaged yet" or "low urgency", not "not affected". The Alpine advisory says you are affected only when all of the following are true. Containers that do not run sshd are not affected.
| Condition | Advisory wording, summarized |
|---|---|
| Build | openssh-server (built without PAM), or openssh-server-pam with UsePAM no |
| Setting | PasswordAuthentication yes (the default) |
| Account 1 | An account whose password field is * (root:* in the base image since about 3.16, key-only users, directory users via musl-nscd, the alpine user in tiny-cloud images) |
| Account 2 | At least one local account with a $5$ or $6$ hash |
[2] Compare the package version with the fixed versions. sshd -V prints only the upstream number: the 3.24.4 container below has the fixed 10.3_p1-r2, but sshd -V says 10.3p1.
# cat /etc/alpine-release3.24.4# apk list -I | grep opensshopenssh-keygen-10.3_p1-r2 x86_64 {openssh} (SSH-OpenSSH) [installed]openssh-server-10.3_p1-r2 x86_64 {openssh} (SSH-OpenSSH) [installed]openssh-server-common-10.3_p1-r2 x86_64 {openssh} (SSH-OpenSSH) [installed]# sshd -VOpenSSH_10.3p1, OpenSSL 3.5.9 29 Sep 2026| Branch | Fixed version | Branch | Fixed version |
|---|---|---|---|
| edge | 10.6_p2-r0 | 3.20 | 9.7_p1-r6 |
| 3.24 | 10.3_p1-r2 | 3.19 | 9.6_p1-r3 |
| 3.23 | 10.2_p1-r1 | 3.18 | 9.3_p2-r4 |
| 3.22 | 10.0_p1-r11 | 3.17 | 9.1_p1-r7 |
| 3.21 | 9.9_p2-r1 | 3.16 | 9.0_p1-r6 |
The 3.21.10, 3.22.8, 3.23.8 and 3.24.4 point releases include the fixed package. 3.21 reached end of support on 2026-11-01, but Alpine published fixed packages back to 3.16.
[3] Check which package you have installed and what sshd actually uses. With the default openssh-server, sshd -T printed no usepam line at all, which marks a build without PAM.
# sshd -T | grep -iE '^(usepam|passwordauthentication|permitrootlogin) 'permitrootlogin prohibit-passwordpasswordauthentication yesopenssh-server-pam installs the binary as sshd.pam, and there is no sshd. **On that install, replace every sshd -V, -T and -t in this guide with sshd.pam.** UsePAM is commented out in the config file and the value is no, which is also an affected setup.
# sshd -T | grep -iE '^(usepam|passwordauthentication) 'sh: sshd: not found# sshd.pam -T | grep -iE '^(usepam|passwordauthentication) 'usepam nopasswordauthentication yesThe default PermitRootLogin prohibit-password protects root, but the advisory notes this does not help if another account that can log in is able to become root, for example through doas.
[4] Count the password fields. Only root can read /etc/shadow. The first command lists accounts whose field is *; the second lists $5$ or $6$ hashes. The test container had one hashed account, ops.
# awk -F: '$2 == "*" { print $1 }' /etc/shadowroot# awk -F: '$2 ~ /^\$[56]\$/ { print $1 }' /etc/shadowopsIf both commands print a name, the account conditions are met. Locked accounts (field !) are not affected (adduser -D on 3.24.4 created !). Directory users have no shadow entry and do not show up here.
[5] Install the fixed package and restart sshd. The advisory points out that upgrading the package does not replace the running daemon. This command upgrades every installed package, not just openssh.
# apk upgrade -U -a# rc-service sshd restartOver SSH, keep the current session open, test with a new connection, and check the version again with the commands in step 2.
[6] If you cannot update yet, turn off password logins. First confirm that SSH key login works, and keep your current session open until a new login succeeds. Accounts without a key cannot log in over SSH after this step; without console access you lock yourself out.
Use the advisory's drop-in plus sed, changed so that nothing existing gets overwritten. First make sure both names are free. Both lines must say No such file; if either file exists, stop and pick other names. If the final grep shows PasswordAuthentication yes in another drop-in, change that file to no as well.
# ls /etc/ssh/sshd_config.d/00-cve-2026-123158.conf /etc/ssh/sshd_config.cve-2026-123158.origls: /etc/ssh/sshd_config.d/00-cve-2026-123158.conf: No such file or directoryls: /etc/ssh/sshd_config.cve-2026-123158.orig: No such file or directory# mkdir -p /etc/ssh/sshd_config.d# grep -ri '^\s*passwordauthentication' /etc/ssh/sshd_config.d/# (set -C; echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-cve-2026-123158.conf)# cp -n /etc/ssh/sshd_config /etc/ssh/sshd_config.cve-2026-123158.orig# sed -i -e '1i PasswordAuthentication no' -e 's/^\(\s*PasswordAuthentication[^y#]*\)yes/\1no/i' /etc/ssh/sshd_configset -C refuses to write a file that already exists, and cp -n silently leaves an existing backup alone. The advisory's sed -i.bak is not used here because running it twice overwrites the first backup with the edited file. When the same two lines were run again in the test, the drop-in step stopped as below, and the backup still matched the original copied at the start.
# (set -C; echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-cve-2026-123158.conf)sh: can't create /etc/ssh/sshd_config.d/00-cve-2026-123158.conf: File existsCheck and restart with only the pair that matches your install. On openssh-server-pam, sshd -t && fails with sshd: not found, the restart is skipped and the old settings keep running.
# sshd -t && rc-service sshd restart# sshd -T | grep -i '^passwordauthentication'# sshd.pam -t && rc-service sshd restart# sshd.pam -T | grep -i '^passwordauthentication'You should see passwordauthentication no. If you have Match blocks, check each condition with -C too. In the test config, a Match User deploy block (PasswordAuthentication yes) stayed at yes with only the drop-in in place, unlike the global value, and was no after the sed.
# sshd -T | grep -i '^passwordauthentication'passwordauthentication no# sshd -T -C user=deploy,host=client.example.com,addr=203.0.113.5 | grep -i '^passwordauthentication'passwordauthentication yesOn 3.18 and older, the default sshd_config has no Include line, so the drop-in is ignored. On 3.18.12, grep -n '^Include' printed nothing and the value stayed passwordauthentication yes with the drop-in in place; on those releases the sed is what does the work.
Undo this only after the fixed package is installed and sshd has been restarted; undoing it earlier reopens the hole. If diff shows anything besides this change (the line at the top and yes→no), copying the backup back discards it too, so save it first. The rm removes only the file this step created. On the PAM install, use sshd.pam -t on the fourth line.
# diff /etc/ssh/sshd_config.cve-2026-123158.orig /etc/ssh/sshd_config# rm /etc/ssh/sshd_config.d/00-cve-2026-123158.conf# cp /etc/ssh/sshd_config.cve-2026-123158.orig /etc/ssh/sshd_config# sshd -t && rc-service sshd restartThe value in the test container after the rm and cp, and a comparison with the original copied at the start:
# sshd -T -C user=deploy,host=client.example.com,addr=203.0.113.5 | grep -i '^passwordauthentication'passwordauthentication yes# cmp /etc/ssh/sshd_config /tmp/pristine-sshd_config && echo restored-originalrestored-originalIn tiny-cloud images (3.18.11 through 3.24.3), the alpine user has a * field and passwordless doas. The advisory says to update every instance built from them or disable password logins on it.
[7] Check whether someone already got in. The advisory says to look in /var/log/messages for Accepted password for lines on accounts that have no password (alpine, root, key-only users), and to review doas use and recently created users, files and authorized keys. If you cannot rule out a login, treat the machine as compromised. On journald systems, search for the same message as in counting SSH login records.
Where checks go wrong
- **Do not judge by the
sshd -Vnumber.** Alpine backports the fix onto older versions, so compare the-rnumber with the table. Ubuntu handles other OpenSSH fixes the same way (USN-8928-1 check). - Test the syntax after editing and before restarting. The order is the same as in test sshd config before reload.
Analyze your auth.log (SSH) log in the browser ↗ — nothing is uploaded.