BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Alpine Linux Users Urged to Patch OpenSSH Authentication Flaw

Alpine Linux Users Urged to Patch OpenSSH Authentication Flaw

Listen to this article -  0:00

A recently disclosed vulnerability in OpenSSH lets an unauthenticated attacker log into accounts that should have no usable password. The issue, named *sshole and tracked as CVE-2026-123158, affects Linux systems running OpenSSH with the musl C library and which don't use PAM. Security researchers now report that attackers are exploiting it in the wild.

The flaw comes from the way OpenSSH checks passwords when musl handles the underlying crypt() call. On an affected system, a password longer than 256 bytes causes musl to return an error value. That value is an asterisk, the same character Linux uses in /etc/shadow to mark an account as having no password. OpenSSH then treats the returned asterisk as a match and permits the login.

Sshole website screenshot

The conditions to exploit the vulnerability are however quite narrow. The server must run OpenSSH before version 10.6p2, be built against the musl library rather than glibc, and operate without PAM. It must also have at least one account with a SHA-256 or SHA-512 password hash and another account marked with an asterisk in its shadow entry. When those conditions are met, any password between 257 and 1,024 characters can authenticate against the passwordless account.

Alpine Linux is the most prominent distribution affected, as it uses musl and its default OpenSSH configuration does not enable PAM. Other musl-based environments, including OpenWrt, Buildroot and Yocto, may also be affected where the same configuration applies. Systems using glibc, PAM, Dropbear or OpenBSD are not affected.

"Accounts that should never take a password at all (root, your key-only deploy user, ldap users, the default user on alpine's aws and azure images) take any password longer than 256 characters."
Ozgun Kultekin, *sshole

Ozgun Kultekin, a security researcher at Wakefield, published the technical explanation on the *sshole site. Kultekin traces the problem to two musl changes made in 2012: the first replaced the NULL error return from crypt() with an asterisk, and the second added a 256-byte limit to SHA-512 password hashing, so longer inputs caused an error. Together, the changes produced a value that could be mistaken for a password hash.

The OpenSSH side of the problem dates from a 2016 fix for CVE-2016-6210, which was a timing attack that could reveal whether a username existed. To make responses take a similar amount of time for valid and invalid users, OpenSSH borrowed the salt from another account and hashed the supplied password anyway. That workaround also applied to real accounts whose shadow entry contained an asterisk.

Kultekin writes that the issue remained unnoticed for roughly a decade because the vulnerable combination was uncommon in testing. OpenSSH is tested on OpenBSD and glibc-based systems, while many Linux distributions route authentication through PAM, which does not call crypt() for asterisk entries in the same way. Kultekin says the bug was found after building OpenSSH in several configurations and testing about 17,600 unusual login attempts.

"On alpine's official aws and azure images that's the default `alpine` user, and it has passwordless `doas`. so it's root"
Ozgun Kultekin, *sshole

On Alpine's official AWS and Azure images, the default alpine user is marked as passwordless and can use doas without a password. This means that an attacker who reaches that account can therefore obtain root privileges. Dan Goodin reports for Ars Technica that the issue can give unauthenticated access to high-privilege accounts within seconds on affected systems.

OpenSSH 10.6p2 contains a fix. Operators who cannot update immediately can disable password authentication by setting PasswordAuthentication no in the SSH server configuration and restarting sshd. Kultekin also advises checking authentication logs for evidence that an account with no password accepted a password. The project has published a detection and background repository.

The vulnerability is being actively exploited. Goodin notes that GreyNoise reported that honeypots in Southeast Asia had been attacked by a group it is tracking known as GT10, which reportedly deploys a backdoor which supports shell commands, reconnaissance and persistence. Goodin reports that watchTowr linked the activity to botnets and cryptocurrency operations, while Previdian recorded 20 exploitation attempts from 13 IP addresses in nine countries. The United States Cybersecurity and Infrastructure Security Agency added CVE-2026-123158 to its Known Exploited Vulnerabilities catalog on 9 November, according to Hackread.

Red Hat has said that its products are not affected because they do not meet the required combination of musl and no PAM. Amazon has likewise marked Amazon Linux 2 and Amazon Linux 2023 as not affected. That does not remove the risk for teams running Alpine-based containers, embedded devices or custom musl builds. Administrators should look for SSH servers built against musl, check whether PAM is disabled, review shadow entries for asterisk-locked accounts, apply OpenSSH 10.6p2 and restart the service.

The vulnerability was publicly disclosed on 5 November and exploitation reports followed within days. For organisations with internet-facing SSH services, the immediate action to take is fairly straightforward: update OpenSSH, restart it, and remove password authentication where it is not needed.

About the Author

Rate this Article

Adoption
Style

BT