The *sshole Bug: A 257 Character Password Logs You Into Root on Alpine Linux

· Security Engineering · By Hassan Nazir

OpenSSH 10.6p2 shipped on November 5, 2026 to fix an authentication bypass on musl based Linux, including Alpine, OpenWrt, Buildroot and Yocto. Send a password longer than 256 characters and sshd may let you into any locked account. Here is the mechanism, who is really exposed, and what to run today.

If you run Alpine Linux, OpenWrt, Buildroot or Yocto images with an SSH server on them, stop reading and check one thing first: is OpenSSH older than 10.6p2? On November 5, 2026 the OpenSSH team shipped a fix for an authentication bypass that people are calling \*sshole (CVE-2026-123158). The short version is almost funny. On the affected setups, a wrong password followed by a password longer than 256 characters can log you into an account that is supposed to have no password at all, including root.

I like this bug because nothing about it is clever on the attacker side. It is two old, reasonable decisions in two different projects that were never meant to meet. That is also why it sat there for about ten years. Let me walk through what happened, who is really exposed, and what I would do on Monday morning.

What Happened

A researcher, Ozgun Kultekin, reported the flaw. Alpine published its advisory on November 5, and OpenSSH 10.6p2 went out the same day. SecurityWeek says OpenSSH developer Damien Miller learned about it the day before the release, and that the team moved fast because AI agents have been rediscovering bugs within hours, which makes long embargoes mostly useful to attackers. I think that is a big deal on its own, and I wrote about the same dynamic in my GPT-6 Cyber and Brotli patch gap post last week.

The score quoted by SecurityWeek is CVSS 8.1. As of the November 6 coverage I read, nobody had reported exploitation in the wild, but the details are public, a proof of concept repo exists, and security vendors quoted in the press expected scanning within hours. Treat it as a race you may already be in.

ItemDetail
IdentifierCVE-2026-123158, nicknamed \*sshole
Fixed inOpenSSH 10.6p2 (Alpine package 10.6p2-r0)
AffectedOpenSSH on musl libc built without PAM
Named distributionsAlpine, OpenWrt, Buildroot, Yocto
Not affectedglibc systems such as Debian, Ubuntu and Fedora, PAM builds, OpenBSD
ExploitationNone reported at the time of the coverage I read

One thing to flag: the sources do not fully agree on every identifier. One vendor page I read lists a different CVE number and mixes in an older 2016 CVE, and it contradicts itself in places. I rely on the SecurityWeek, GBHackers and GitHub write ups, which agree with each other, and I treat the other page as unreliable on that detail.

The Mechanism, Step by Step

This is the part worth understanding, because it is a clean example of a bug that lives in the seam between two components.

  1. sshd checks a password by hashing the attempt with the C library function crypt() and comparing the result to the account's stored password field.
  2. In /etc/shadow, a single asterisk in that field means the account is locked or has no password. No real hash can ever equal it, so nobody should be able to log in with a password.
  3. If the stored field is too short to contain a salt, sshd borrows the salt from another account that does have a real hash. That behavior was added in 2016 to stop attackers from telling real usernames from fake ones by timing.
  4. On musl, crypt() cannot handle input longer than 256 bytes. Instead of returning a proper error, it returns the string "\*".
  5. sshd now compares "\" from the failed hash against "\" in the locked account's field. They match. Login succeeds.

So the attacker never cracks anything. They make the hash function fail in exactly the way that looks like the locked account marker. The write up on GitHub traces the two halves to separate changes: musl returning an asterisk on failure goes back to 2012, and the borrowed salt logic in sshd dates to 2016. Neither change is wrong by itself. Together they hand you the keys.

Here is a rough sketch of the logic, simplified so you can see the shape of the failure. This is illustrative pseudocode, not the real sshd source.

// simplified, illustrative only
const char *stored = "*";                    // locked account
const char *salt_from = other_user_hash;     // borrowed from a user with a real hash
const char *attempt_hash = crypt(password, salt_from);  // password is 257+ chars on musl

// musl returns "*" instead of NULL when input is too long
if (strcmp(attempt_hash, stored) == 0) {
    return AUTH_OK;   // "*" == "*"
}

The upstream fix makes sshd skip the comparison when the stored field is too short to be a real hash, and it stops relying on a pointer into libc's static buffer. The patch is described as applying to versions from 7.3p1 onward.

Who Is Actually Exposed

This is where headlines overreach, so let me be precise. All of the following need to be true, per the sources I read:

  • The system uses musl libc and sshd was built without PAM. Alpine's standard openssh-server package is affected. The PAM variant with UsePAM yes is not.
  • PasswordAuthentication is on, which is the OpenSSH default.
  • At least one account has exactly "\*" as its password field. That includes root on many minimal images, key only users, and default users in some cloud images.
  • At least one other account on the same box has a real SHA-256 or SHA-512 crypt hash, so sshd has a salt to borrow.

That last condition is what keeps this from being everywhere. A fresh container with only root and no other password account may not meet it. A cloud VM image or router firmware with a normal user who has a password probably does. GBHackers flags Alpine's official AWS and Azure images as a particular concern. One vendor page I read says those images ship a default account with passwordless privilege escalation, which would turn a login into root immediately. I could not verify that detail independently, so check your own images rather than trusting my summary.

The other number getting passed around is about 22 million internet facing systems with SSH on port 22, cited via Shodan. Ignore it as a risk estimate. It counts every SSH server, and most are glibc boxes that are not affected. The real exposed set is Alpine and other musl systems with password logins left on, which is much smaller but not small, because Alpine is the favorite base image of the container world.

Why Containers and Embedded Devices Make This Worse

Alpine is tiny, so people use it everywhere. Most of those containers never run sshd, and they are fine. The trouble is the ones that do: lab images, debug containers that somebody baked an SSH server into, jump hosts, VM images built from Alpine, and the long tail of routers and appliances on OpenWrt, Buildroot and Yocto.

Embedded gear is the scary part. Firmware rarely gets updated quickly, and the vendors who build it on musl may not even know they ship OpenSSH with PAM disabled. I wrote recently about exposed Danfoss refrigeration controllers in the French supermarket hack, where vendor contracts for always on remote access made patching painful. Same story here: devices that must stay reachable are exactly the ones that are slow to fix.

A second trap is operational. The Alpine package update replaces the binary, but the running daemon keeps serving the old code until it is restarted. I have seen teams patch and feel safe while the vulnerable process was still alive. Restart sshd.

What I Would Do Today

My own checklist, in order. This is my opinion, not an official advisory.

  1. Find where you run OpenSSH on musl. Search your image registry and your fleet inventory for Alpine, OpenWrt, Buildroot and Yocto bases that include openssh-server.
  2. Upgrade to OpenSSH 10.6p2 or later. On Alpine that is the openssh package update. Then restart sshd.
  3. If you cannot patch yet, set PasswordAuthentication to no in sshd_config, or in a drop in file, and restart sshd. This closes the hole because the whole attack is a password login.
  4. Run the check script from the public repo as root on a sample box. It reports libc, sshd version, PAM support, the password setting, which accounts have an asterisk and whether a salted hash exists to borrow.
  5. Look in your auth logs for successful password logins to accounts that should not have passwords, especially root. A password login for a key only user is the signal.
  6. Rebuild base images rather than patching in place if you bake them. Old images keep the bug alive in your registry.

Here is a quick one to see which accounts are locked on a box, so you know your exposure to this class of problem:

# list accounts whose password field is exactly "*"
awk -F: '$2 == "*" { print $1 }' /etc/shadow

# confirm the running sshd was restarted after the upgrade
ps -o lstart,cmd -C sshd

Tip: the cheapest durable fix is turning password authentication off everywhere you can. Keys only SSH removes this entire bug class, not just this CVE.

If your SSH is already behind a VPN or a bastion with key only auth, you are in much better shape, and that is the same idea I made in my zero trust architecture implementation guide: reachability should never be the only thing standing between an attacker and a shell.

What Is Still Unverified

Some honest limits. I did not run the proof of concept, and I have no independent forensic confirmation of any attack. Most of the public coverage traces back to the same sources: the researcher's write up, Alpine's advisory and a few security vendors' summaries. The claim that no one is exploiting it is simply the absence of reports at the time of writing, which is weak evidence for a bug this simple. The expected scanning timelines from vendors are predictions, not observations. And the detail about default cloud image accounts came from a single vendor page that had other errors, so verify it yourself.

My Take

The lesson I keep coming back to is that old assumptions rot quietly. Nobody did anything stupid in 2012 or 2016. A library chose a failure value that looked harmless. A daemon added a clever defense against username enumeration. Both were reviewed, both shipped, and the combination sat for about a decade because OpenSSH is mostly tested on OpenBSD and glibc, while most distributions route logins through PAM. The setup where it broke was too small to get attention and too widely deployed to ignore.

I also think the fast release is the right call, and it should be the new normal. When AI tooling can find the same bug in hours, an embargo that lasts weeks protects attackers more than users. The cost lands on us: patch windows are shrinking, and the teams that win are the ones who already know what they run and can rebuild it quickly. This also fits the pattern in my breakdown of the trojanized Claude Code extension with an SSH backdoor: attackers love SSH because it is the shortest path from a small mistake to a full shell.

Finally, I would not wait for the next one of these. Inventory your musl systems, turn off password SSH, and make sure your patch process includes restarting the thing you just patched. For the speed side of that, my write up of the PHP2Shell RCE analysis shows how little time you get once details are public.

Key Takeaways

  • OpenSSH 10.6p2, released November 5, 2026, fixes CVE-2026-123158 (\*sshole), an authentication bypass on musl based Linux without PAM.
  • The cause is musl crypt() returning an asterisk on input over 256 bytes, which sshd then matches against locked accounts whose password field is also an asterisk.
  • Exposure needs musl, no PAM, password authentication on, an asterisk account and another account with a real SHA-256 or SHA-512 hash.
  • Debian, Ubuntu, Fedora, PAM builds and OpenBSD are reported as not affected.
  • Patch, then restart sshd. If you cannot patch, set PasswordAuthentication to no.
  • No in the wild exploitation was reported in the coverage I read, but details are public, so assume scanning is coming. Treat sources that disagree on CVE numbers with caution.

Related posts

Sources

Related field notes