The Password That Was Just a Star
For about ten years, OpenSSH on musl has accepted any long enough password for accounts that shouldn't take one at all. Nobody wrote a bad line. Five sensible decisions just met. So I went and checked my own boxes.

Contents
Overview
Someone sent me to sshhole.com tonight. I read it, read it again, and then went to check my own servers.
The short version: OpenSSH on musl Linux, which means Alpine, OpenWrt, Buildroot, Yocto and a lot of the Docker images you’ve pulled, has a problem. Accounts that should never accept a password at all will accept any password between 257 and 1024 characters.
Any password. It doesn’t have to be right. It just has to be long.
The bug was found by Özgün Kültekin at Wakefield, and his write-up is worth your time. It’s short, it’s funny, and it has a little demo where you can type at a Debian box and an Alpine box side by side. This post is my summary and what I found when I looked at my own stack. The credit and the digging are his.
The star
A * in the password field means “nobody logs in with a password here”. It’s been that way since 1980. A star isn’t a valid hash, so nothing you type can ever produce it, and the check always fails.
That’s what makes it a good lock, and it’s why key-only accounts use it. Your deploy user, your LDAP users and root on Alpine probably all have one.
To check a password, sshd hashes what you typed and compares the result with what’s stored. Same string, you’re in.
Now hold on to that sentence, and watch what happens to it.
Five reasonable decisions
What I like about this one is that nobody did anything stupid. Follow it step by step and each decision makes sense:
- The standard says
crypt()returns NULL on failure. Plenty of programs never check, compare against NULL and crash. - 2012: musl stops returning NULL. To stop those crashes, a failed
crypt()now returns a string that can’t match a real password. The string they picked was*. - Three weeks later: musl caps SHA-512 passwords at 256 bytes. Longer passwords take longer to hash, so this stops people keeping your CPU busy with giant ones. Past the cap,
crypt()fails. And failing now means returning*. - 2016: OpenSSH fixes a timing leak. Unknown users got an instant no, so you could time your way to a list of real usernames. The fix is to hash the password anyway, using the salt from some other account, just to burn the same amount of time. It meant to do that for invalid users. It also does it for real users with a
*. - 2022: Alpine moves root from
!to*. Without PAM,!also blocks SSH keys, which breaks cloud images. A star keeps keys working and looks locked.
Put them together. You send 300 characters to an account with * in the password field. sshd borrows another account’s salt, and crypt() gives up because the password is too long. It returns *, sshd compares that with the stored *, and they match.
You’re in.
The lock and the failure message turned out to be the same character.
Why you might be fine
It takes all of these at once:
sshdruns on musl- it’s not using PAM (Alpine’s
openssh-serverdoesn’t by default) - password logins are on, which is the default
- there’s an account with just
*as its password - there’s another account with a real password, so there’s a salt to borrow
Debian, Ubuntu, Fedora and anything else on glibc are fine. So is anything going through PAM, and so are Dropbear and OpenBSD.
The bad case is Alpine’s official AWS and Azure images, where the default alpine user has a star and passwordless doas. That’s root.
What I found on my own stack
I went through it read-only. The VMs on my new platform are Ubuntu and AlmaLinux, with password logins already off, so none of them qualify.
Then there was the one I’d have missed if I had stopped at the hosts.
My self-hosted Git runs in a container, and that container is Alpine. It’s musl, it has an OpenSSH older than the fix, and both root and git have a * in /etc/shadow. That’s most of the list, sitting inside an image I pulled and never really thought about as “an Alpine box”.
It isn’t exploitable, because the image ships with PasswordAuthentication no, and the port is only reachable over VPN. That one line takes the whole bug off the table. Every other condition can be true, and it still doesn’t matter.
My Docker host checks wouldn’t have told me any of this. Asking the host “are you on musl?” gets you “no”, while a container on it says yes. Look inside the containers too, especially anything that publishes port 22 or a Git SSH port.
I haven’t been through everything yet. Other homelab VMs and network gear are still on my list, so this is what I’ve checked, not a clean bill of health.
What to do
Update. OpenSSH 10.6p2 fixes it:
apk upgrade openssh
Then turn password logins off, if you haven’t already:
echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf
rc-service sshd restart
This isn’t a workaround. Keys only and no password logins is hardening 101, and this is exactly why it’s on the list: you don’t need to know about a ten-year-old bug in how crypt() fails if nothing ever gets as far as asking for a password. It’s the same reason every server I run gets it in its base setup.
For containers, updating means pulling a new image once one with the fix exists. Running apk upgrade inside a container is gone the next time you recreate it.
Then check whether it has already happened to you. There’s a checker at github.com/oz9un/sshole. I haven’t run it myself yet, so read it first, like you would anything you run as root.
The point
The write-up points out that people came close over the years. A Debian developer asked glibc to copy musl’s behaviour in 2013. A 2024 thread on the musl list was about the same * and the same 256-byte limit, breaking BusyBox passwd. And a security review touched that exact OpenSSH function days before he found it, four lines from the bug.
Nobody connected them, because no single part was wrong. Each project tested against its own world. OpenSSH tests on OpenBSD and glibc, musl doesn’t test sshd, and most distributions go through PAM, which never even gets this far.
That’s what I’m taking from this. I’ve spent a lot of this year writing about CVEs in things I run, and most of those were one project with one bug. This is the kind a scanner has no way of seeing on its own: every piece doing what it promised, and the bug living in the gap between them.
Also, he found it by building sshd every way he could think of and throwing about 17,600 strange logins at it, then looking for the one build that disagreed. Not by being cleverer than everyone who’d read that code. He just compared the builds nobody compared.
The boring advice held up, though. Nobody needed to find this bug to be safe from it. They just needed the checklist everyone already has, and to actually apply it to the containers as well as the hosts.
Ten years, and the only thing wrong was a star.