Skip to main content

Kaer NewsSoftware

OpenSSH emergency fix stops long-password bypass on Alpine Linux

A decade-old OpenSSH flaw lets attackers log into password-disabled accounts on Alpine Linux by sending passwords over 256 characters; version 10.6p2 fixes it.

4 min read
OpenSSH emergency fix stops long-password bypass on Alpine LinuxPhoto: The Hacker News

Key points

OpenSSH released emergency fix 10.6p2 for a flaw allowing password bypass on Alpine Linux via long passwords.

OpenSSH released an emergency fix on 5 November for a critical flaw that lets attackers bypass password authentication on Alpine Linux by sending a password longer than 256 characters. The vulnerability, dubbed *sshole and tracked as CVE-2026-123158, was discovered by Özgün Kültekin, a researcher at security firm Wakefield. OpenSSH version 10.6p2, released Thursday, protects against the flaw.

The attack is strikingly simple: an attacker sends a password between 257 and 1,024 characters long to an OpenSSH server running on a vulnerable configuration. On affected systems, this gets accepted as valid authentication, allowing access to accounts that should have password authentication disabled, such as root, key-only users, and LDAP users. The targeted accounts must have an asterisk (*) in their password field.

How the attack works

The flaw affects Linux systems using the musl C library instead of the traditional GNU C library, and only those running OpenSSH's secure shell daemon without Pluggable Authentication Modules (PAM) and with password authentication enabled. Musl libc is common in embedded Linux systems and is the standard C library for Alpine Linux, which provides official cloud images for both AWS and Azure.

The vulnerability is the product of three changes made years apart. In 2012, musl's developers capped password length at 256 bytes to prevent denial-of-service attacks, and made the library's password hashing function return an asterisk whenever it fails. The asterisk is the same character Unix has used since the 1980s to mark accounts for which no password should ever match.

In 2016, OpenSSH changed how it checks passwords for accounts whose password field offers no salt, borrowing another account's salt to prevent username enumeration. Then in 2022, Alpine switched root's password field to an asterisk so that SSH key logins would keep working. When an attacker sends an over-long password, the hash attempt fails and returns an asterisk, which matches the stored asterisk, and the login succeeds.

Affected systems

The flaw affects every Alpine release checked, from 3.21 through 3.24 and edge, as well as older releases from 3.16 to 3.20. Alpine's standard OpenSSH package is built without PAM, and password logins are enabled by default, so Alpine servers meet the conditions out of the box. On official cloud images published between versions 3.18.11 and 3.24.3, the default user account, named alpine, is one of the password-disabled accounts.

The alpine user in the official tiny-cloud images is also affected. An attacker who logs in as that user can switch to root because the images grant it passwordless 'doas' privileges. The images are exposed as soon as an administrator sets a password for any other account on the system, because a legitimate account with a real password needs to exist for the attack to work.

OpenSSH maintainers claim the bug is not actually in their code. 'We consider the root cause of this bug to be outside sshd, but it is exploitable via sshd and can be avoided there,' the OpenSSH project said. However, they moved quickly to add mitigation in the 10.6p2 emergency update. Project developer Damien Miller urged administrators of affected systems to disable password authentication or shut down SSH immediately.

What to do now

There is no indication that vulnerable systems have been exploited, but experts expect attackers to try. 'Internet-exposed SSH servers are already being hammered by password guesses and brute-force attempts around the clock,' said Jake Knott, head of threat intelligence at watchTowr. 'Exploiting this vulnerability simply means those same attackers add a very long password attempt to that brute-force list. We'd be extremely surprised if we didn't see SSH brute-forcers attempting this by the weekend.'

Administrators should check whether the flaw was already used against their servers. An 'Accepted password' entry in /var/log/messages for an account that has no password, such as root, a key-only user, or the default alpine user, is a strong sign of compromise. Alpine recommends reviewing doas usage, recently created users and files on exposed machines, and says any server where a login cannot be ruled out should be treated as compromised.

For affected systems that cannot be updated, the alternative is to disable password authentication and restart the SSH daemon. Kültekin also published a check script on GitHub that identifies exposed servers and lists the accounts at risk. The OpenSSH advisory states bluntly that administrators should treat any machine with a suspicious login as compromised.

Frequently asked questions

What is the *sshole vulnerability?

It's a critical OpenSSH flaw that lets attackers bypass password authentication on Alpine Linux by sending a password longer than 256 characters. It affects accounts with an asterisk in the password field, allowing login without the correct password.

Which systems are affected?

Systems using musl libc, running OpenSSH without PAM, with password authentication enabled, and having at least one account with an asterisk password field. Alpine Linux, including cloud images for AWS and Azure, is affected.

How can I protect my system?

Update OpenSSH to version 10.6p2 or newer. If you can't update, disable password authentication and restart the SSH daemon. Check logs for 'Accepted password' entries for accounts that shouldn't accept passwords.

More from this edition