A significant security flaw in OpenSSH allows remote attackers to access certain Alpine Linux accounts without requiring a valid password or SSH key. This vulnerability, identified as CVE-2026-123158 and termed ‘SSHole,’ impacts unpatched systems using the musl C library without Pluggable Authentication Modules (PAM) and allowing SSH password logins. OpenSSH addressed the flaw with a patch issued on November 5, which Alpine Linux promptly incorporated into their packages.
Details of the SSHole Vulnerability
The IOTSEC Forum highlighted the vulnerability with a lab report dated November 23, detailing how an unpatched version of OpenSSH on Alpine Linux 3.24 allowed login with an invalid password. This finding underscores the vulnerability’s severity, although the updated Alpine package successfully blocked such unauthorized access. Previously, OpenSSH verified passwords by comparing hashes, but the musl’s crypt() function could mistakenly return an error marker resembling the stored hash value, leading to unauthorized logins.
Preventive Measures and Fixes
The recent patch resolves this issue by rejecting any stored values deemed too short to be legitimate password hashes and modifies how account data is handled to prevent unintended overwrites. The OpenSSH 10.6p2 release notes acknowledged Özgün Kültekin of Wakefield for identifying this flaw. It’s important to note that a standalone Alpine base image doesn’t inherently pose a risk; only systems running a vulnerable SSH server with password authentication enabled are at risk, as detailed in Alpine’s security advisory.
Security Recommendations and Observations
Alpine has also highlighted issues with older tiny-cloud images, previously noted in an OpenSSH bypass report. These images included an alpine user capable of obtaining root privileges via doas without a password. Although not exposed initially, subsequent account modifications could increase vulnerability. Users should verify the installed server package revision, not just the version displayed in an SSH banner. The first patched Alpine packages are 10.3_p1-r2 for version 3.24, 10.2_p1-r1 for 3.23, and 10.0_p1-r11 for 3.22. Following an upgrade, it’s crucial to restart the SSH server with ‘rc-service sshd restart’.
In cases where immediate patching isn’t feasible, ensure key-based access is operational, disable password authentication, and restart sshd, keeping the current session open until a successful new login. Additionally, scrutinize /var/log/messages for password entries related to accounts intended only for key-based SSH access, and assess doas activity for any suspicious user additions, file changes, or authorized_keys modifications. A successful login following a failed attempt is not a definitive sign of exploitation. However, a password login on an account meant to reject such attempts requires immediate attention.
For systems unable to conclusively rule out unauthorized access, Alpine recommends treating them as compromised. Keeping abreast of such security vulnerabilities is crucial for maintaining robust system security and safeguarding against unauthorized intrusions.
