OpenSSH Password Bypass Puts Alpine Linux Cloud Images at Risk

| 2 Min Read
A 10-year-old flaw lets attackers log into password-disabled accounts on some musl-based systems with an oversized password.

A password check in OpenSSH can be bypassed with a single oversized password on certain musl-based Linux systems. The flaw, called *SSHole and tracked as CVE-2026-123158, is especially relevant to Alpine Linux cloud images, where a compromised default account can lead to root access.

Security researcher Ozgun Kultekin of Wakefield found the bug, which has been present for about a decade. OpenSSH maintainers issued a mitigation in the emergency OpenSSH 10.6p2 update, while saying the underlying defect is outside OpenSSH’s code, according to maintainer Damien Miller.

The attack is unusually simple. “On affected systems, the exploit is strikingly simple: send a password between 257 and 1,024 characters long,” said Jake Knott, head of threat intelligence at watchTowr. That request can turn a password-disabled account into an accepted login.

Why Alpine is exposed

The vulnerability depends on a narrow combination of system choices: a Linux distribution using musl, OpenSSH without PAM, password authentication enabled, and an attacker who knows the name of an account whose password is disabled. Debian, Ubuntu, and Fedora use glibc and aren’t affected; systems running alternatives such as Dropbear also fall outside the reported exposure.

Alpine’s standard OpenSSH package is built without PAM, and password login is enabled by default. Its official cloud images from versions 3.18.11 through 3.24.3 include an alpine account with no password and passwordless doas privileges. Once an administrator adds a separate account with a real password, an attacker may be able to log in as alpine and switch to root.

The Alpine project has issued emergency updates for its OpenSSH package. If an update isn’t possible, its advice is to turn off password authentication in the OpenSSH configuration and use key-based logins.

A collision between three design decisions

The failure emerged from changes made at different times for different reasons. In 2012, musl capped passwords at 256 bytes to limit the server resources consumed when hashing long inputs. It also made its password hashing function return an asterisk when hashing fails.

That asterisk has a separate Unix meaning: it marks an account for which no password should authenticate. OpenSSH later changed its handling of accounts without a usable password salt, borrowing another account’s salt to reduce username discovery through timing attacks. Then, in 2022, Alpine changed root’s password field to an asterisk so SSH key authentication would continue to work.

Put those behaviors together and the bypass becomes clear. An overlong password makes musl’s hash operation fail and return an asterisk. OpenSSH compares that result with the asterisk in the disabled account’s password field; the values match, and authentication succeeds.

Patch systems and look for suspicious logins

Alpine cloud images are a likely focus because their default configuration satisfies the prerequisites. The issue is limited to systems using musl, unlike the 2024 regreSSHion vulnerability, but it requires no specialized exploit development. Knott said attackers already make routine password guesses against internet-facing SSH servers and could add long passwords to those attempts.

Administrators should review authentication logs for an “Accepted password” entry tied to an account that has no password, such as root, a key-only user, or Alpine’s default alpine account. Alpine also advises checking doas activity, newly created users, and files on exposed machines. Its advisory says to treat a server as compromised if administrators can’t rule out a successful login.

Kultekin has published a GitHub check script that identifies exposed servers and lists accounts at risk. For Alpine operators, applying the package update and checking for unexpected logins are the immediate steps; the underlying issue shows how small changes across a C library, an SSH daemon, and a distribution can combine into an authentication bypass.

Source: Robert Martinez · www.csoonline.com

Comments

Please sign in to comment.