Insight

A 257-byte password can bypass OpenSSH authentication on musl hosts without PAM. SANS sensors saw increased attempts, but their 255-character capture limit hides the payload.

By Riftweld Labs

Insights8 min read
OpenSSH’s musl password bypass is narrow, scanned, and already being exploited
A 257-byte password collides with a '*' shadow field on qualifying musl hosts, prompting patches and scans.

A password of 257 bytes can defeat OpenSSH password authentication on musl systems without PAM, and SANS Internet Storm Center Cowrie sensors recorded increased attempts within days of disclosure. The same honeypots capture only the first 255 characters of an SSH password, so the clearest network signature is also the one those sensors cannot fully see.

In this article

Why this matters

This is not a password-guessing problem. It is a value-collision flaw in which musl returns "*" for an oversized password, OpenSSH compares that result against a target account whose shadow field is also "*", and the server accepts the login. The attacker needs no credential, no brute force and, according to OX Security, no repeated attempts when every exposure condition is present (OX Security).

The exposure is narrow but consequential. A host qualifies only if it runs musl rather than glibc, uses OpenSSH without PAM, has PasswordAuthentication enabled, permits SSH login to an account whose shadow field is *, and holds at least one local account with a real $5$ or $6$ SHA-crypt hash from which sshd can borrow a salt. Direct root login adds the requirement PermitRootLogin yes, because the default prohibit-password blocks that route (StepSecurity).

The impact is highest where those conditions coincide with privilege. On Alpine’s official AWS and Azure images, the default alpine user has a * shadow field and passwordless doas, so a successful bypass of that account is effectively root access (OX Security). OX Security assigns the flaw a CVSS v3.1 score of 8.1 High.

Exposure needs musl, no PAM, password login, a '*' account, and a salt donor; patching or config changes break the path.
Exposure needs musl, no PAM, password login, a '*' account, and a salt donor; patching or config changes break the path.

What happened

The vulnerability is the product of three decisions spread across roughly a decade. In 2012, musl established the collision by returning "*" rather than NULL when crypt() failed and by capping password input at 256 bytes to limit CPU consumption. In 2016, OpenSSH introduced a non-PAM password-checking path that could hash a submitted password using settings borrowed from another account, reducing username-enumeration information leaks; StepSecurity ties that change to the fix for CVE-2016-6210 (StepSecurity).

In 2022, Alpine created a common target configuration: beginning with Alpine Linux 3.16, the default root account uses * in its shadow field, allowing SSH key authentication while blocking ordinary password logins. Key-only users and the default user on certain Alpine cloud images share that pattern (OX Security).

Disclosure and fixes followed on November 5, 2026. OpenSSH released 10.6p2, and Alpine published patched packages for every branch back to 3.16, including unsupported releases. The upstream fix, commit 4353fdc43, refuses to compare stored fields shorter than a plausible hash. Özgün Kültekin of Wakefield reported the issue to OpenSSH, and Cycode published its analysis the same day (OX Security).

StepSecurity reproduced the bypass on November 6 in a full Alpine 3.24 VM and an Alpine Docker container with port 22 published, both pinned to the pre-fix package 10.3_p1-r1. On November 8, the SANS Internet Storm Center reported increased exploitation attempts against its Cowrie SSH honeypots following the vulnerability’s emergence (SANS Internet Storm Center).

An oversized password becomes '*' in musl, matching a target account's '*' shadow field and passing authentication.
An oversized password becomes '*' in musl, matching a target account's '*' shadow field and passing authentication.

How the bypass works

The mechanism is a collision between two meanings of the same string. On musl, crypt() refuses inputs longer than 256 bytes and returns "*" on failure. In OpenSSH’s non-PAM path, sshd may hash the submitted password using settings obtained from another account even when the target account has no valid hash. An attacker who submits a password longer than 256 bytes to an eligible account whose stored field is * receives "*" from musl; OpenSSH compares it with the stored "*", the values match, and authentication succeeds (OX Security).

The salt-donor requirement is the detail most likely to be missed during triage. StepSecurity requires at least one local account with a real $5$ or $6$ hash, and OX Security states the same condition as “at least one other account on the box has a real password.” A freshly provisioned Alpine host with only key-only accounts may therefore not be exploitable until some local account acquires a password hash, including one created for a service, break-glass or automation account (StepSecurity).

The upstream fix does not change musl. OpenSSH 10.6p2 instead avoids the collision by refusing to compare stored fields shorter than a plausible hash, reflecting upstream’s position that musl’s return value is the root cause while OpenSSH can and should avoid treating it as a valid match (StepSecurity).

Exposure and limits

The realistic target set includes Alpine Linux 3.16 and later, OpenWrt where OpenSSH rather than the default Dropbear is installed, Buildroot, and Yocto built with TCLIBC=musl. Debian, Ubuntu, Fedora and other glibc systems are outside this authentication path, as are PAM-backed servers, hosts with PasswordAuthentication no, accounts whose field is ! rather than *, containers without an OpenSSH server, and the Dropbear and OpenBSD SSH implementations (OX Security).

Containers and embedded devices extend the operational burden. StepSecurity reproduced the bypass in an Alpine Docker image with port 22 published and noted that Alpine is among the most-used container base images, while sshd appears in images built for remote debugging. A patched host does not help if a vulnerable sshd binary is baked into an image that is redeployed, and CI/CD runners present the same problem (StepSecurity).

Several limits qualify the record. StepSecurity’s lab confirmed a failed-first-attempt behavior described in the original disclosure, while OX Security states that a single attempt suffices when all conditions are present; the two accounts are not fully aligned, so a rejected first oversized-password attempt does not establish that a host is safe. StepSecurity also found version-based detection producing false positives on patched systems because Alpine backported the fix into older package versions (StepSecurity).

Claim Status Basis
A 257–1,024 byte password can bypass authentication on qualifying musl hosts Confirmed StepSecurity reproduction in an Alpine 3.24 VM and container; OX Security length range
SANS Cowrie sensors saw increased attempts after disclosure Observed SANS Internet Storm Center, November 8, 2026
A single attempt suffices when all exposure conditions hold Reported OX Security; StepSecurity observed a failed first attempt
Alpine’s default alpine user yields root via passwordless doas Company statement OX Security description of official AWS and Azure images
Official Alpine tiny-cloud images are safe on first boot Reported StepSecurity qualification tied to the salt-donor requirement
CVE-2026-123158 appears in the reviewed OpenSSH and Alpine advisories Not established StepSecurity found no CVE cited as of November 6, 2026

Detection and mitigation

Patch first. Upgrade to OpenSSH 10.6p2 or an Alpine package containing the backport, and restart sshd afterward. Alpine’s fixed package versions differ by branch, including 9.0_p1-r6 on 3.16, 9.9_p2-r1 on 3.21, 10.3_p1-r2 on 3.24 and 10.6_p2-r0 on edge, so version strings alone are unreliable indicators of remediation (OX Security).

Verify by behavior and configuration rather than package label. The exposure checklist is musl libc, no PAM, PasswordAuthentication yes, an SSH-permitted account with * in its shadow field, and at least one local account holding a real SHA-crypt hash. Where patching is not immediately possible, PasswordAuthentication no or UsePAM yes breaks the vulnerable path (StepSecurity).

For detection engineering, the practical signature is an SSH password authentication request carrying a password materially longer than 256 bytes. OX Security gives the usable range as 257 to 1,024 bytes, while StepSecurity’s client and askpass setup limited its own tests to 1,023 bytes. SANS Cowrie sensors capture only the first 255 characters of SSH passwords, which limits their visibility into the exploit payload even as attempt counts rise (SANS Internet Storm Center).

Method and sources

This analysis draws on the SANS Internet Storm Center diary, the OX Security technical write-up, the StepSecurity reproduction and the Cycode analysis published November 5, 2026. The SANS diary is published under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license, which permits sharing and adaptation with attribution, noncommercial use and share-alike terms (Creative Commons).

The record is sufficient to establish the mechanism, the exposure conditions, the fixes and observed scanning, but it does not establish the number of compromised hosts, the identity of any attacker, or whether exploitation has succeeded against production systems. One identifier caveat also remains: as of November 6, 2026, the OpenSSH and Alpine advisories reviewed by StepSecurity cited no CVE, and CVE-2026-123158 is the identifier researchers were using. Operators should track both the CVE string and upstream commit 4353fdc43 (StepSecurity).

Adversary simulation

Prove the route before someone else does.

We reproduce the path an attacker would take, show the impact with evidence, then retest after the fix.