Introduction
The cybersecurity landscape recently witnessed a highly critical vulnerability dubbed “SSHole” (CVE-2026-123158). This flaw represents a severe authentication bypass issue that primarily impacts lightweight, container-friendly operating systems like Alpine Linux. By exploiting an unintended collision between several independent security mechanisms, unauthenticated remote attackers can bypass SSH authentication entirely. In specific cloud environments, this seamlessly translates to immediate, unauthorized root access, making it one of the most critical threats to modern cloud infrastructure and containerized workloads. Because Alpine is the foundational base image for millions of Docker containers and Kubernetes deployments worldwide, the potential attack surface is staggering. Furthermore, the exploit leaves minimal traces in standard access logs, making post-incident forensic analysis incredibly challenging for security teams trying to identify unauthorized intrusions before massive data exfiltration occurs.
Learning Objectives
By reading this vulnerability analysis, you will be able to:
- Grasp the foundational security concepts that inadvertently collided to create the SSHole vulnerability.
- Understand the specific technical interaction between
musl libcand OpenSSH. - Identify the exact system configurations and conditions that make an environment vulnerable.
- Apply immediate mitigation techniques and permanent remediation steps to secure affected systems.
What is SSHole? A Critical Root Vulnerability in Alpine Linux Systems (CVE-2026-123158)

SSHole (CVE-2026-123158) is a critical authentication bypass vulnerability that emerges not from a single coding error, but from the dangerous overlap of three distinct security features. In Linux systems, user accounts that are disabled or do not have a password (meaning they should only be accessed via SSH keys) are securely marked with an asterisk (*) in the password field of the /etc/shadow file. Under normal circumstances, this mechanism guarantees that no text-based password can ever match the stored hash, theoretically locking the account down against brute-force attacks. However, the vulnerability occurs when OpenSSH’s defense mechanism against user enumeration timing attacks interacts poorly with a Denial of Service (DoS) protection feature built directly into the musl libc library. This obscure edge-case interaction essentially tricks the SSH daemon into believing that an attacker has successfully provided the correct password for a completely locked-down account, bypassing the cryptographic barrier entirely. The implications of this flaw are profoundly amplified in modern cloud architectures. Because administrators heavily rely on default accounts without passwords to streamline automated deployments and provisioning scripts, the attack surface expands dramatically. Once the authentication layer is bypassed, the system inherently trusts the rogue connection, paving the way for complete infrastructure compromise without a single valid credential.
- It is classified as an Authentication Bypass vulnerability with a critical CVSS score of 9.8.
- It specifically targets the flawed interaction between the
musl libccryptographic functions and OpenSSH’s internal daemon logic. - It primarily affects system accounts that have been explicitly disabled or locked using the
*shadow hash indicator. - It requires absolutely no prior knowledge of the target system’s credentials, private SSH keys, or active user behavior.
+--------------+ +-------------------------+
| | 1. Send 257-byte password | |
| Attacker | ----------------------------> | OpenSSH Daemon |
| | | |
+--------------+ +-------------------------+
|
| 2. Pass input to crypt()
V
+------------------------------------+ +-------------------------+
| | <------ | |
| /etc/shadow File | 4. Match| musl libc |
| | '*' | |
| Account: alpine | with | 3. Reject oversized input,
| Password Hash: '*' | '*' | return '*' as error |
+------------------------------------+ +-------------------------+
|
| 5. MATCH FOUND!
V
[ Access Granted -> Root via doas ]
Technical Detail: How the Vulnerability Works
The mechanics of the SSHole vulnerability can be broken down into a sequence of events triggered by a meticulously crafted, anomalous login attempt. To prevent CPU exhaustion attacks, the crypt() function within the musl libc library is designed to reject passwords that exceed 256 bytes in length. When it encounters such a massive input, it refuses to process the expensive hashing algorithm and instead safely returns a single asterisk (*) as an error indicator to the calling application, aiming to drop the load immediately. Concurrently, OpenSSH is designed to prevent attackers from guessing valid usernames based on server response times. If an attacker tries to log into an invalid account or an account without a password, OpenSSH still performs a “dummy” password verification in the background using the password salt of another valid user on the system. This ensures that every login attempt takes the exact same amount of time, masking the existence of specific users and thwarting enumeration techniques.
The fatal collision happens when an attacker targets an account that has no password (like the default alpine user, which possesses a * in the /etc/shadow file). The attacker intentionally sends a password longer than 256 bytes. The musl libc library rejects the long password and outputs the error code *. OpenSSH’s faulty validation logic then blindly compares this returned * with the actual hash stored in the shadow file (which is also *). Because the two values perfectly match, OpenSSH interprets this as a successful cryptographic verification.
- Trigger: The attacker initiates a standard SSH connection but provides a manipulated password string exceeding the 256-byte limit.
- Library Response: The
musl libclibrary intercepts the oversized string, aborts the hash calculation, and returns the*error token. - Daemon Logic: OpenSSH proceeds with its timing mitigation routine, improperly comparing the returned error token directly against the
shadowfile entry. - Escalation: Access is mistakenly granted to the default account, which subsequently leverages its pre-configured
doasrules to instantly achieve root privileges.

Affected Software & Plugins
The scope of CVE-2026-123158 is heavily restricted by the specific architectural choices of the underlying operating system and its authentication daemons. Unlike widespread vulnerabilities that affect the ubiquitous glibc library, this flaw is strictly confined to systems that rely on the lightweight musl libc implementation. This makes Alpine Linux, Void Linux (the musl variant), and various embedded firmware solutions like OpenWrt the primary targets for this sophisticated attack vector. Furthermore, the vulnerability requires a very precise configuration state within the OpenSSH daemon itself. Systems utilizing Pluggable Authentication Modules (PAM) are naturally immune because PAM overrides and entirely replaces the faulty internal OpenSSH validation logic. The attack only succeeds in environments where basic password authentication is enabled, PAM is disabled, and the specific shadow file conditions are met simultaneously.
- Operating systems utilizing
musl libcinstead of standardglibc(e.g., Alpine Linux, OpenWrt, Buildroot). - OpenSSH daemon versions prior to 10.6p2 that were compiled or configured without Pluggable Authentication Modules (PAM) support.
- System configurations explicitly allowing standard password authentication (
PasswordAuthentication yesin thesshd_configfile). - Systems containing at least one disabled or passwordless account (
*) alongside at least one valid hashed account to facilitate the timing mitigation phase.
Conclusion
The SSHole vulnerability (CVE-2026-123158) serves as a stark reminder that isolated security mechanisms can sometimes combine to create catastrophic systemic failures. It demonstrates how a Denial of Service protection rule in one underlying library and a timing attack mitigation feature in a network daemon can unwittingly collaborate to bypass authentication entirely. This “perfect storm” of overlapping logic flaws highlights the extreme complexity and fragility of modern software stacks. System administrators operating Alpine Linux or other musl-based systems must take immediate and decisive action to secure their infrastructure against this threat. To permanently remediate the issue, OpenSSH must be updated to version 10.6p2 or the subsequently patched version provided by the respective OS maintainers. Crucially, updating the software packages is not enough on its own; a full restart of the SSH daemon is mandatory to clear the vulnerable code from the active system memory. If immediate patching is not feasible due to strict production constraints or uptime requirements, administrators can apply a highly effective temporary mitigation by altering their SSH daemon configuration. By explicitly setting PasswordAuthentication no in the sshd_config file and relying strictly on cryptographic keys, the attack vector is completely neutralized. Ultimately, adopting a Defense in Depth strategy remains the best safeguard against such unpredictable, multi-layered vulnerabilities.