Security
Critical SSH flaw lets attackers access Alpine Linux devices without a password
A newly disclosed vulnerability affecting Alpine Linux and systems using musl with OpenSSH allows unauthenticated remote login when specific configurations align.
Ars Technica
A long-standing security gap in how OpenSSH interacts with musl—a lightweight C library used by Alpine Linux—creates a pathway for attackers to gain remote access to vulnerable systems without any credentials. The flaw affects devices where multiple conditions converge, potentially putting Alpine Linux deployments and similar configurations at risk.
The Perfect Storm of Configuration#
The vulnerability stems from a combination of factors that must all be present for exploitation to succeed. The system must run OpenSSH with musl as its C library, and crucially, must not use PAM (pluggable authentication modules), the authentication framework that typically validates user credentials. Additionally, the target machine needs at least one user account whose password hash uses SHA256 or SHA512 algorithms, paired with another account configured as passwordless—designated by an asterisk (*) in the system's /etc/shadow file.
Passwordless accounts are standard practice for systems relying on certificate-based authentication rather than traditional passwords, making this configuration widespread in production environments.
How the Attack Works#
When an attacker attempts to log into a passwordless account, they can trigger the vulnerability by entering more than 256 characters in the password field. The attack succeeds consistently on the first try—no retries or guessing required. According to security researchers at Checkpoint, the vulnerability exploits how sshd uses the hashed salt from the SHA256 or SHA512 account; without this specific hash algorithm present, the attack fails.
Alpine maintainers warned that successful exploitation is highly reliable: "It takes one connection, works every time, and needs no retries."
Who's at Risk#
Alpine Linux, valued for its minimal footprint, is widely deployed in containers and embedded systems. While root accounts are protected by Alpine's default SSH settings, accounts with administrative privileges via doas or sudo can still be compromised, potentially granting attackers elevated access. Other lightweight Linux distributions using similar stack configurations—musl plus OpenSSH without PAM—could face the same risk.
The specific interplay between these components suggests that systems running alternative distributions with identical setups remain vulnerable until patching occurs.

