OpenSSH 10.6p2 fixes CVE-2026-123158: on Alpine Linux, a 257-byte password logs in to accounts that have none
The fix is a four-character minimum in auth-passwd.c, OpenSSH says the root cause is not its own, and Alpine's advisory says upgrading without restarting sshd changes nothing.
OpenSSH 10.6p2, released on 2026-11-05, exists for one fix. The release notes call it "a critical security workaround that affects Linux systems that use the musl libc and PAM disabled." Four days later CISA added the bug, CVE-2026-123158, to its Known Exploited Vulnerabilities catalog with a due date of 2026-11-12, three days out.
What the bug does
The CVE record, published by MITRE, describes it this way: "sshd in OpenSSH before 10.6p2 on Linux, when musl libc is used without PAM, lacks a workaround for a password authentication bypass (related to misinterpretation of whether a string is intended to be a password hash). For some configurations of accounts, any password between 256 and 1024 characters succeeds."
Alpine Linux, the platform the CVE names as its example, published the mechanism in its own advisory. Without PAM, sshd hashes the attempted password with the C library's crypt() and compares the result to the stored password field. For an account whose field is too short to hold a salt, sshd borrows the salt of another account. Then:
musl's crypt() returns the string * as an error indicator when the key is over 256 bytes long. * is also exactly what the stored field contains for every account with no password, so the "hash" matches and the login succeeds.
Alpine Linux security advisory, 2026-11-05
So the accounts at risk are the ones administrators think of as having no password at all: key-only users. Alpine's summary of the consequence: "One user with a password is enough: it makes every account without one reachable."
The sources disagree on two details. The CVE says 256 to 1024 characters; Alpine says "257 to 1024 bytes." And MITRE's CVSS vector scores attack complexity as High (8.1 overall), while Alpine writes that an attack "takes one connection, works every time, and needs no retries."
Who is affected
Alpine lists conditions that must all hold:
- sshd runs without PAM: the
openssh-serverpackage, oropenssh-server-pamwithUsePAM no. PasswordAuthenticationisyes, which is the OpenSSH default.- Some account has
*as its password field. - At least one local account has a
$5$or$6$password hash.
Not affected, per the same advisory: systems with PasswordAuthentication no, openssh-server-pam with UsePAM yes, accounts locked with !, and containers that do not run sshd. Root ships as root:* on Alpine, but the default PermitRootLogin prohibit-password protects it. That is less comfort than it sounds: the official tiny-cloud images from 3.18.11 through 3.24.3 ship an alpine user with a * field and passwordless doas.
Alpine says every release it checked is affected, 3.16 through 3.24 and edge.
The fix, and whose bug it is
OpenSSH does not accept the blame. The release notes: "We consider the root cause of this bug to be outside sshd, but it is exploitable via sshd and can be avoided there." The commit message says the project is "well equipped to avoid it."
The patch is small: 34 insertions and 17 deletions across three files. The core is a new constant in auth-passwd.c, and one more condition on the comparison:
#define MIN_PASSWORD_HASH_LEN 4
...
ret = encrypted_password != NULL &&
strlen(pw_password) >= MIN_PASSWORD_HASH_LEN &&
strcmp(encrypted_password, pw_password) == 0;
A stored field shorter than four characters can no longer match anything, whatever crypt() returns.
What to do
Alpine backported the patch to every branch back to 3.16, including ones past end of support. Fixed package versions run from 9.0_p1-r6 (3.16) to 10.3_p1-r2 (3.24) and 10.6_p2-r0 (edge). Two instructions from the advisory matter more than the version table:
- "Upgrading the package alone does not replace the running daemon." Restart sshd after
apk upgrade. - If you cannot update, set
PasswordAuthentication noand restart. "Either one closes the hole."
To check for past use, Alpine says to look in /var/log/messages for sshd lines reading Accepted password for an account that has no password, and adds: "If you cannot rule out a login, treat the machine as compromised."
CISA's entry marks ransomware use as "Unknown" and sets forensic triage to "Yes." The bug was reported by Özgün Kültekin of Wakefield.
Primary sources: OpenSSH 10.6p2 release notes, Alpine Linux security advisory, openssh-portable commit 4353fdc, CVE-2026-123158 record, CISA KEV catalog, read 2026-11-11.