SSHOLE (CVE-2026-123158)
OVERVIEW
- SSH (Secure Shell) is a widely used technology that allows users and administrators to securely access remote servers.
- It is commonly used to manage Linux systems, cloud servers, and applications.
- However, a recently highlighted security vulnerability called SSHole reveals an unexpected weakness in how certain SSH configurations handle password authentication.
What Is the SSHole Vulnerability?
- SSHole is a security vulnerability affecting certain OpenSSH installations running on Linux systems that use the musl C library, particularly Alpine Linux.
- Under certain configurations, accounts that are intentionally locked against password-based access can unexpectedly accept a password.
- The most surprising part is that an attacker may be able to log in by submitting a password longer than 256 characters.
How Does the Vulnerability Work?
- To understand SSHole, let's first look at how Linux normally handles passwords.
- When a user creates an account, Linux stores password information in a protected file called
/etc/shadow. - This file contains password hashes rather than actual passwords.
- Some accounts are not supposed to allow password-based login.
- To prevent this, Linux uses special characters such as
*in the password field. - Think of
*as a locked door: no matter what password someone enters, access should be denied. - However, a problem occurs because of how certain versions of the
musllibrary handle unusually long passwords.
Here's what happens:
- The password length limit: The musl library has a limit of 256 bytes for password processing in the relevant hashing operation.
- The unexpected response: When a password exceeds this limit, the library returns a special value represented by
*instead of generating a normal password hash. - The comparison problem: OpenSSH can compare this returned value with the account's stored password field.
- Authentication succeeds: If both values match, OpenSSH may incorrectly treat the password as valid.
- As a result, an account that should reject every password may accept one under these specific circumstances.
- In simple terms, the system mistakenly treats a failed password check as a successful one.
Which Systems Are Affected?
- SSHole does not affect every Linux system or every OpenSSH installation.
- According to the published research, the vulnerability requires a specific combination of conditions:
- The SSH server must be running on a system using the musl C library.
- PAM (Pluggable Authentication Modules) must not be used for SSH authentication.
- Password-based SSH authentication must be enabled.
- The system must contain an account whose password field is set to
*. - Another account must have a valid password hash.
- This makes certain Alpine Linux environments particularly important to investigate.
- Other potentially affected environments include OpenWrt, Buildroot, and Yocto systems using musl.
- The research also highlights Alpine Linux cloud images for AWS and Azure, where default account configurations may introduce additional risk.
- Systems using glibc, such as typical Debian, Ubuntu, and Fedora installations, are not affected by this particular vulnerability under the conditions described.
How Can You Protect Your System?
- The good news is that the vulnerability has a documented fix.
- According to the SSHole research, OpenSSH 10.6p2 addresses this issue.
- System administrators should consider the following steps:
Update OpenSSH
- Upgrade OpenSSH to the fixed version or a newer supported version provided by your Linux distribution.
- For Alpine Linux, the website recommends:
apk upgrade openssh