A newly disclosed and critical vulnerability in the standard OpenSSH server package allows network-based attackers to bypass authentication entirely and log into accounts configured without a password, such as SSH key-only accounts. The security flaw specifically targets environments running Alpine Linux under certain default configurations, prompting an immediate patch release from the OpenSSH development team alongside urgent security advisories from ecosystem maintainers.
The vulnerability, which has been rated as critical by the OpenSSH project, affects systems running the openssh-server package where password authentication is enabled and at least one other account on the machine maintains a valid password. To exploit the flaw, an attacker requires network access to the target server, the username of an account lacking a local password, and a crafted password string ranging between 257 and 1,024 bytes in length.
In response to the discovery, the OpenSSH project rolled out version 10.6p2 to mitigate the flaw. Simultaneously, the Alpine Linux security team published backported patches covering every supported release going back to version 3.16. The underlying mechanism that enables the attack is deeply tied to the interaction between the OpenSSH daemon (sshd) and musl, the lightweight C library upon which Alpine Linux is constructed. According to Damien Miller of the OpenSSH project, non-Linux operating systems, Linux distributions built on the standard glibc library, and systems that route password checks through the Pluggable Authentication Module (PAM) interface are entirely unaffected by the bug.
Because Alpine’s default openssh-server package is compiled without PAM support and leaves password logins enabled out of the box, it falls directly into the risk profile. Miller strongly advised administrators managing affected infrastructure to act immediately by explicitly setting PasswordAuthentication=no or disabling SSH access entirely on vulnerable systems until updates can be applied. At the time of disclosure, no active exploitation in the wild had been reported.
Who Is Exposed
According to the security advisory issued by Alpine Linux, a server is exposed to potential compromise only when a specific set of operational conditions are simultaneously met. The attack vector requires that the OpenSSH server is built without PAM, that password authentication is permitted, that at least one account on the targeted machine possesses a valid password hash utilizing specific hashing algorithms, and that the targeted account lacks a password entirely.
Furthermore, the attacker must possess the exact name of an account that does not have a password configured. The existence of just a single account with a password on the machine is sufficient to expose every other account on that same system that lacks a password. Security advisories indicate that when the conditions align, the attack succeeds consistently on the very first attempt over a single network connection.
On typical Alpine installations, accounts without passwords frequently include service accounts, administrative helper accounts, or designated key-only user profiles. While the root account is generally protected by the default configuration setting PermitRootLogin prohibit-password and cannot be reached directly via password authentication unless PermitRootLogin yes has been explicitly enabled, this protective measure can be circumvented if an exposed account possesses local privilege escalation capabilities, such as passwordless doas access.

Specialized system images, including tiny-cloud configurations spanning versions 3.18.11 through 3.24.3, configure the default alpine user with passwordless doas privileges. While these cloud instances are secure upon initial boot, they become vulnerable to exploitation the moment any standard password hash utilizing the $6$ format is generated on the system—an event that commonly occurs when a system administrator sets a console password. Once that hash exists, an external actor can log into the unpassworded alpine user account and subsequently leverage doas to escalate privileges to root.
Conversely, container environments that do not execute an SSH daemon, systems where PasswordAuthentication is disabled, and cloud instances provisioned via cloud-init which automatically injects secure configuration parameters remain unaffected. Accounts explicitly locked with an exclamation mark in the /etc/shadow file are similarly immune, as are machines where no account maintains a dollar-sign style password hash.
The scope of the security issue is not restricted exclusively to Alpine Linux. Özgün Kültekin of Wakefield, the security researcher who originally reported the vulnerability, highlighted in his technical write-up that other musl-based embedded and lightweight distributions—specifically OpenWrt, Buildroot, and Yocto—should also be reviewed by administrators. However, Kültekin noted that OpenWrt typically manages SSH services via Dropbear by default, and Dropbear itself is not vulnerable to this specific exploit class. On OpenWrt systems, the vulnerability is only relevant if an administrator has manually uninstalled or replaced the default SSH mechanism with the OpenSSH server package.
How to Fix It
For administrators managing Alpine Linux instances, remediation requires both updating the installed packages and restarting the running SSH daemon process, as merely upgrading the package binaries does not automatically cycle the active sshd process in memory. Point releases including versions 3.21.10, 3.22.8, 3.23.8, and 3.24.4 incorporate the patched package directly. Furthermore, older release branches spanning from version 3.16 to 3.21, which have otherwise reached their formal end-of-support lifecycle, have also received updated packages to protect legacy deployments.
Cloud virtual instances originally initialized from tiny-cloud images predating these point releases still require either a package update or the application of configuration-level mitigations. For administrators compiling OpenSSH from source code, version 10.6p2 fully incorporates the necessary source code changes to prevent the authentication bypass.
In environments where immediate software updates are impractical, disabling password-based authentication offers an effective workaround to block the attack vector entirely. Administrators employing this mitigation are advised to verify that SSH public key authentication is fully functional and to maintain their current terminal session until a secondary SSH login can be successfully established and validated. Once verified, the configuration parameter PasswordAuthentication no should be applied, the configuration syntax validated using standard testing tools, and the SSH daemon restarted.
Security advisories recommend adding the configuration directive via a dedicated drop-in file within the /etc/ssh/sshd_config.d directory, a feature natively supported by Alpine’s default SSH configuration framework starting from version 3.19 onward. Additionally, administrators should audit existing configuration files to ensure that all instances of the PasswordAuthentication directive within /etc/ssh/sshd_config are explicitly set to no, including any parameters nested inside conditional match blocks. Post-implementation checks should confirm that the active daemon configuration correctly reports password authentication as disabled.
Forensic recommendations for potentially compromised infrastructure include reviewing system logging facilities for suspicious authentication events indicating successful password acceptance for accounts that rely exclusively on cryptographic keys or administrative defaults. On systems identified as exposed, comprehensive audits of privilege escalation logs, recently created user accounts, modified file systems, and authorized key repositories are strongly advised to ensure the integrity of the host.

Why Long Passwords Work
In standard operational environments operating without PAM, the OpenSSH server handles the password verification process independently. The daemon passes the supplied password string to crypt(), the standard C library function responsible for transforming a plaintext password into its securely hashed representation, and subsequently compares the computed output against the stored hash field retrieved from the system authentication databases.
An account configured without a local password typically stores only an asterisk symbol within the password hash field. This single-character placeholder is fundamentally too short to contain a valid cryptographic salt, which is the randomized prefix utilized by hashing algorithms to protect against rainbow table attacks. To process the request, sshd borrows the salt belonging to another valid user account on the machine that possesses a real, functioning password hash.
For hashing implementations utilizing the standard $5$ and $6$ formats, the musl library’s implementation of crypt() enforces a strict design behavior: it explicitly refuses to process password inputs exceeding 256 bytes in length and returns an asterisk character to signal an error condition. When an attacker supplies an oversized password, this resulting error character matches the single-character asterisk stored in the unpassworded account’s shadow record, causing sshd to incorrectly interpret the mismatch as a successful authentication. The upper boundary of the attack vector—ranging up to 1,024 bytes—is governed by OpenSSH’s internal limits on maximum password string lengths.
This underlying behavior stems from a historical modification introduced to the musl C library codebase in August 2012, which altered failed crypt() function calls to return an unmatchable hash rather than a null pointer to accommodate legacy software that lacked proper error-checking routines. The subsequent introduction of the 256-byte input restriction later that month was intended as a protective measure to shield servers from potential denial-of-service vulnerabilities.
The secondary component of the flaw—the mechanism by which sshd borrows salts from alternate accounts—originated from an OpenSSH code change deployed in July 2016 designed to address an older information disclosure vulnerability that allowed unauthorized users to determine the existence of specific usernames on a system. Security researchers noted that the interaction of these legacy behaviors has effectively created the conditions for the current authentication bypass for years.
The code modifications introduced in OpenSSH version 10.6p2 alter how the server handles verification by explicitly instructing sshd to refuse a match whenever the stored authentication field is shorter than four characters. OpenSSH maintainers have characterized this adjustment as a defensive workaround, emphasizing that the architectural root cause originates within the C library behavior rather than the SSH server codebase itself. Official stable packages distributed for Alpine Linux incorporate an equivalent functional patch to resolve the issue at the operating system level.
Why the Fix Came the Next Day
The OpenSSH development team learned of the vulnerability shortly before its public disclosure and coordinated an accelerated release schedule to deploy the patch as rapidly as possible. In his public statements regarding the release, Damien Miller explained that the project’s philosophy toward security embargoes has shifted, noting that extended disclosure windows are increasingly viewed as hazardous and primarily beneficial to malicious actors. This change in perspective is driven by the observation that automated artificial intelligence tools and threat actors frequently rediscover identical software vulnerabilities independently within hours of initial reporting.
At the time of the software update and initial advisories, no formal CVE identifier had yet been assigned to the vulnerability.
