A 257-Character Password Logs You Into Any Locked Alpine Account

Here is a sentence I did not expect to write this year: on an unpatched Alpine Linux box, you can log in over SSH to an account that has no password at all. Not by guessing the password. Not with a stolen key. You type 257 A's and the server lets you in.

The bug is called SSHole. CVE-2026-123158, CVSS 8.1, fixed in OpenSSH 10.6p2 on November 5. It was added to CISA's Known Exploited Vulnerabilities list four days later, which is the part that should make you stop scrolling and go check your containers. Public proof-of-concept code exists, and scanners were already hitting it within days of disclosure.

But the part I keep thinking about is not the severity score. It is how the bug got built. Nobody wrote bad code here. Three reasonable decisions, made years apart by three different groups of people, fit together into a hole that sat in plain sight for a decade.

What a locked account is supposed to mean

On Linux, every account has a line in /etc/shadow. The second field is the password hash. A normal account looks like this:

alice:$6$salt$longhash... 

An account that should never accept a password looks like this:

deploy:*:20780:0:99999:7::: 

That single * is the standard way to say "this account has no password, ever." It is what you get when you create a deploy user with adduser and no password, which is how most of us build key-only accounts. The * is not a hash. It cannot match anything. That is the whole point.

Except, as of this month, it can match something. It can match itself.

The three decisions

Decision one: musl's crypt() never returns NULL.

POSIX says crypt() returns NULL when it fails. In practice, plenty of programs never checked for NULL. They compared the result against the stored hash, dereferenced a null pointer, and crashed. So in 2012, musl changed the contract: on failure, crypt() returns a short string that can never match a real hash, instead of crashing the caller. The string they picked was *.

Read that again. The failure marker musl chose is the exact same character Unix uses to mean "this account is locked." Two completely different meanings, one character.

Decision two: musl caps SHA-crypt passwords at 256 bytes.

Twenty days later, musl added SHA-256 and SHA-512 password hashing. Those algorithms get slower the longer the password is, so a single enormous password could pin a CPU. Rich Felker capped the key at 256 bytes. Anything longer fails. And failure, per decision one, now means returning *.

So: give musl's crypt() a 257-byte password, and it hands you back a single asterisk. No error, no warning, just *.

Decision three: OpenSSH hashes the password anyway.

In 2016, OpenSSH added a timing-attack mitigation. If you try to log in as a user with no usable password hash, a naive server would skip the hashing step entirely and reject you instantly. An attacker measuring response times could tell which accounts have real passwords and which do not. So OpenSSH started doing the work regardless: when the target account has no usable salt, it borrows a real salt from another account on the system, runs the hash, and then rejects you anyway. The timing stays uniform. The account stays locked.

That is good engineering. It is also the final piece of the puzzle.

How it fits together

Say you have an Alpine box. There is a deploy account with * in its shadow field, and somewhere else on the same box, a normal user with a real $6$ hash. That second account does not even need to be reachable over SSH. It just needs to exist.

You connect and try to log in as deploy with a short password. OpenSSH looks at deploy's shadow entry, finds *, and borrows the real salt from the other account to do its timing-safe hash. The borrowed salt gets cached in a static buffer. The login fails, as it should.

On the same connection, you try again with a 257-byte password. This time, something in the salt-handling path goes wrong, and musl's crypt() gets called in a way that returns * instead of a real hash. OpenSSH compares the result against the stored field. The result is *. The stored field is *. They match.

The server logs you in.

The details of the second attempt matter, and researchers have published the exact sequence, but the shape of it is what counts: the server never recovered a password, never broke a hash, never guessed anything. It compared a failure marker against a lock marker, found them identical, and opened the door.

Who is actually affected

The conditions are specific, and that is worth stating plainly, because the first wave of headlines made it sound like every Alpine container on earth was wide open:

  • OpenSSH before 10.6p2, on Linux, linked against musl, built without PAM.
  • Password authentication enabled on the SSH server.
  • At least one account with a * password field, and at least one other account with a real $5$ or $6$ hash on the same box.

Alpine Linux is the obvious case, and it is the default base image for a staggering share of Docker images, which is why this travelled fast. Buildroot, Yocto, and OpenWrt builds that ship OpenSSH the same way are in scope too. Ubuntu, Debian, Fedora, anything on glibc, anything with PAM enabled: not affected. Accounts locked with ! instead of * are not affected either, because ! is not the string musl returns on failure.

But "specific conditions" is not the same as "rare." A locked account plus a normal account is the default shape of a server. If you run Alpine anywhere with SSH and password auth on, you should have patched this the day it dropped. Alpine shipped patched packages the same day as the OpenSSH release, backported across branches 3.16 through 3.24. If you only check the version in the SSH banner, note that Alpine's fixed packages are backports: 10.3_p1-r2 on 3.24, 10.2_p1-r1 on 3.23, 10.0_p1-r11 on 3.22. Check the package revision, not the banner.

The part that bothers me

I build a messenger, so I spend a lot of my time thinking about what "locked" means. A locked door, a locked key, a locked account. The whole security model rests on a small number of things that are supposed to be impossible, and most of them are enforced by convention, not by math. The * in a shadow file is a convention. musl returning * on failure is a convention. Neither is wrong on its own. They were written fourteen years apart by people solving different problems, and nobody owned the seam between them until a researcher named Özgün Kültekin, working with Wakefield, traced the whole chain and reported it.

That is the real lesson, and it is not a new one, but it keeps needing to be relearned: the bugs that hurt most are rarely in the algorithm. They are in the seam. In the error path. In the thing that was supposed to be impossible, handled by a sentinel value that somebody else also chose for a different impossible thing.

There is a fix in OpenSSH 10.6p2, and it is the right kind of fix: reject stored values that are too short to be a real password hash, so a failure marker can never compare equal to a stored field again. The seam gets owned.

If you run Alpine, patch it. If you build systems, audit your sentinels. And the next time someone tells you a particular failure is impossible, ask what string it returns when it happens anyway.