# Oversized passwords bypass disabled-account locks on musl-based Linux SSH servers

- **Canonical URL:** https://www.probackend.com/linux-kernel-infrastructure-security/oversized-passwords-bypass-disabled-account-locks-on-musl
- **Section:** News & Analysis
- **Published:** 2026-11-05
- **Summary:** A flaw dubbed *sshole lets attackers log into musl-based Linux accounts that block password logins by entering an oversized password.

---

## An oversized password unlocks disabled accounts on musl-based Linux SSH servers

A flaw dubbed "*sshole" lets attackers log into certain Alpine Linux and other musl-based Linux accounts that are configured to block password logins — simply by entering an oversized password. OpenSSH is the affected daemon, and the bug only bites on systems using the musl C library: Alpine Linux, OpenWrt, Buildroot, and Yocto. No CVE identifier had been assigned at the time of disclosure, and the issue has existed since 2016.

## What happened, and who's affected

Security researcher Özgün Kültekin of Wakefield discovered and disclosed the issue. It stems from how OpenSSH handles password verification errors on musl systems. When sshd is built without PAM, it checks a password by hashing the attempt with crypt() and comparing the result to the stored password field. For an account whose stored field is too short to contain a salt, sshd borrows the salt of another account. musl's crypt() returns the string "*" as an error indicator when the key is over 256 bytes long. "*" is also exactly what the stored field contains for every account with no password, so the "hash" matches and the login succeeds.

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries. The attacker needs the name of an account whose password field is "*" (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. One user with a password is enough to make every account without one reachable.

Affected systems include every Alpine release checked, 3.21 through 3.24 and edge, plus older releases that no longer receive regular updates (3.16 to 3.20). You are affected if you run the Alpine openssh-server package built without PAM, or openssh-server-pam with UsePAM no (openssh-server-pam with UsePAM yes is not affected); PasswordAuthentication is yes; the machine has an account whose password field is "*"; and at least one local account has a $5$ or $6$ password hash.

Accounts with a "*" password field include root, which ships as root:* in the base image since about Alpine 3.16. OpenSSH's default PermitRootLogin prohibit-password protects root, so root is only reachable if PermitRootLogin yes is set. That does not help if another account that can log in is able to become root, for example through doas. Also affected are any key-only user created with adduser without a password or with usermod -p '*', and users coming from a directory service through musl-nscd (nslcd, winbind, sssd), since they have no shadow entry. The alpine user in official tiny-cloud images is also in this category.

## Who is not affected

Docker and other container users that do not run sshd in the container are not affected. Systems with PasswordAuthentication no are safe, as are systems using openssh-server-pam with UsePAM yes. Locked accounts — those with "!" as the password field in /etc/shadow — cannot log in with a password or a key. Systems where no account has a $-style password hash are also unaffected. Cloud images configured through cloud-init, which writes PasswordAuthentication no, are safe on first boot.

## How to fix it

Upgrade openssh and restart sshd. On Alpine, run apk upgrade -U -a. Fixed packages exist for every release back to 3.16: edge 10.6_p2-r0; 3.24 10.3_p1-r2; 3.23 10.2_p1-r1; 3.22 10.0_p1-r11; 3.21 9.9_p2-r1; 3.20 9.7_p1-r6; 3.19 9.6_p1-r3; 3.18 9.3_p2-r4; 3.17 9.1_p1-r7; and 3.16 9.0_p1-r6. Restart the daemon afterward with rc-service sshd restart, since upgrading the package does not restart a running sshd.

If you cannot update, disable password authentication. Make sure SSH key login works first and keep your current session open until you have tested a new login. Run as root:

mkdir -p /etc/ssh/sshd_config.d
echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf
sed -i.bak -e '1i PasswordAuthentication no' -e 's/^\(\s*PasswordAuthentication[^y#]*\)yes/\1no/i' /etc/ssh/sshd_config
sshd -t && rc-service sshd restart
sshd -T | grep -i passwordauthentication

The last command should print passwordauthentication no. Either updating or disabling password logins closes the hole.

## Cloud images and older releases

The official tiny-cloud images (qcow2, VHD and AMI artifacts) from 3.18.11 through 3.24.3 ship an alpine user with a "*" password field and passwordless doas. They are safe on first boot but become exploitable as soon as any $6$ hash exists on the machine — for example when an admin sets a console password or user-data adds a user with hashed_passwd. An attacker then gets a shell as alpine and can use doas to become root. Images built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 and later include the fixed package; on every running instance, update openssh or disable password authentication.

Releases that are no longer supported (3.21 and older) carry the same bug. 3.21 reached end of support on 2026-11-01, but fixed packages were published for each release back to 3.16.

## How to know if you were attacked

Look in /var/log/messages for sshd lines reading "Accepted password for" an account that has no password (alpine, root, or any key-only user). Review doas use and recently created users, files, and authorized keys on exposed machines. If you cannot rule out a login, treat the machine as compromised.

## Credits

Reported by Özgün Kültekin of Wakefield. Thanks to Damien Miller and Darren Tucker of the OpenSSH project for the fix and the 10.6p2 release, to Timo Teräs for help analyzing the issue, and to Natanael Copa, who built and uploaded the updated packages. OpenSSH 10.6p2 avoids the problem in sshd; the stable-branch packages above carry a patch for the same problem.

![an oversized password unlocks disabled accounts on musl-based](https://assets.probackend.com/f7cc28cc-5402-4e0e-a946-249f0a05bb46?token=ast_7b9ee8975a4b187969d396286e3f9717c42f2331)
