Skip to content
Threat ResearchCVE-2026-123158

SSHole and the sshd that should not be in your containers

A cyber-research take on SSHole, the OpenSSH authentication bypass on Alpine Linux: how one long password unlocks a locked account, why the bug is narrower than the headlines, and the real question it raises for everyone shipping container images.

Shadow Labs · Threat Intelligence

10 min read

Key takeaways

TL;DR
  1. 01

    SSHole (CVE-2026-123158, CVSS 8.1) lets an attacker log into a password-disabled account on musl-based OpenSSH, Alpine and the like, by sending one unusually long password. OpenSSH 10.6p2, released 5 November 2026, fixes it.

  2. 02

    The bug is not new. Its three ingredients have sat in place since 2016; what changed is that the world moved onto tiny musl images, which turned a latent edge case into a reachable door. [Our assessment]

  3. 03

    It only fires when five things line up at once: musl, sshd without PAM, password auth on, a locked account, and a real `$5$`/`$6$` hash on the host whose salt gets borrowed. Two of the five are yours to switch off.

  4. 04

    We reproduced the root cause in an isolated lab: on musl a 399-byte password collapses to the same `*` a locked account uses, while glibc keeps it a real hash. The real lesson is an SSH server baked into a container image. [Our assessment]

SSHole is the kind of flaw that teaches you more about your infrastructure than about OpenSSH. On 5 November 2026 the project shipped 10.6p2 to fix CVE-2026-123158, an authentication bypass that lets someone log into a locked account by sending a password that is simply too long. One connection, no retries, deterministic. [Confirmed]

Here is the part the headlines miss. The bug is not new. Its ingredients have been sitting in place since 2016. What changed is not the code, it is where the code runs: the world moved onto tiny musl-based images, Alpine above all, and that migration quietly turned a latent edge case into a reachable door. This is how SSHole works, what we confirmed in our own lab, who is actually exposed, and the question it should make every team ask. [Our assessment]

Three safe decisions that became a hole

SSHole is not one mistake. It is three reasonable decisions that only turned dangerous once they met.

  1. musl returns an asterisk on failure. When its crypt() function cannot produce a hash, musl returns the string * rather than a null pointer, so that older code does not crash (2012).
  2. musl caps password length at 256 bytes. As a denial-of-service guard, it refuses to hash anything longer, which makes crypt() fail, which means it returns * (2012).
  3. OpenSSH borrows a salt. To avoid revealing which usernames exist, sshd hashes a failed attempt using a salt taken from another account on the host. Against an account whose shadow field is a bare *, which has no salt of its own, it borrows the salt from some real $5$ or $6$ hash on the box, and the oversized password turns that into * as well (2016).

Now the two asterisks meet. An sshd that is not using PAM compares musl's * to the * stored for the locked account, sees a match, and calls it a successful password. OpenSSH 10.6p2 closes it by refusing any match when the stored field is shorter than four characters. [Confirmed]

That borrowed salt is why the fifth condition in the diagram matters: with no real hash anywhere on the host, there is no salt to borrow, and the chain never completes.

All five conditions are on: SSHole is exploitable on this host.

SSHole switchboard: all five conditions open the holeAn interactive switchboard for the OpenSSH SSHole bypass (CVE-2026-123158). Five conditions act as switches: musl libc as on Alpine, sshd running without PAM, password authentication enabled, a locked account with an asterisk in the shadow file, and a real crypt hash on the host. With all five on, the hole is open and an attacker can log into the locked account. Turn any one off and the hole closes. Two of the five, running without PAM and leaving password authentication on, are under the defender control; turning either off closes the hole without patching. OpenSSH 10.6p2 removes the bug entirely.musl libc (Alpine)sshd without PAMPasswordAuthentication yesAccount locked (* in shadow)A real $5$/$6$ hash on the boxExploitable hereone connection, root-capable▸ Cyan = you control it (PAM, password auth).Tap a switch. 10.6p2 removes the bug for good.
Fig. 1The five conditions as a switchboard. Flip either «you control» input, PAM or password authentication, and the hole closes before you even patch.

We reproduced the root cause

We do not take a bug's word for it. In two isolated, throwaway containers we ran a small program that calls crypt() the way sshd does, with a 399-byte password and a real SHA-512 salt, and compared the two libraries. [Confirmed]

Environmentcrypt() of a 399-byte passwordMatches a locked * account?Verdict
Alpine (musl)returns *yesroot cause present
Debian (glibc)returns a real $6$… hashnonot reachable

On musl the oversized password collapses to the exact * an account uses to mean "no password here", so the comparison a PAM-less sshd makes would accept it. On glibc it stays an ordinary hash, which is why Debian, Ubuntu and RHEL are untouched. That is the mechanism, confirmed, with no live sshd attacked and nothing weaponizable published:

text
musl  (Alpine):  crypt(<399-byte password>, "$6$...") => *        == locked account's *   -> accepted
glibc (Debian):  crypt(<399-byte password>, "$6$...") => $6$...   != *                    -> rejected

The full reproduction harness and our detection content are what we share with teams under NDA. [Our assessment]

Who is actually exposed

Five conditions must hold at once, and together they describe musl systems in their default posture. That is not only Alpine. It is Alpine, but also OpenWrt on home and branch-office routers, Buildroot and Yocto firmware in appliances and IoT, and the enormous population of Docker images built on musl. [Confirmed] glibc distributions, anything with PAM enabled, and anything with password authentication off are all out of scope.

Root is usually safe by default, because standard Alpine ships PermitRootLogin prohibit-password. The real prize is a service account: the generic alpine user that cloud images create, which is locked with a * and also granted passwordless doas to root. Land on that and you are root in one more step.

The headline is the bug. The lesson is the architecture.

Here is the finding worth keeping, and it is not about OpenSSH. The ingredients of SSHole have existed since 2016. What made them reachable is an architectural choice almost everyone made without noticing: shrinking everything onto musl images, and leaving an SSH server inside them. [Our assessment]

A container almost never needs its own sshd. You reach into a running container through the orchestrator, with docker exec or kubectl exec, not by opening port 22 inside the workload. So the honest question is not whether you patched OpenSSH. It is how many of your images ship an SSH server, and why. Most teams cannot answer that in the moment, and that gap is the real exposure. [Our assessment]

Is it being exploited?

Carefully, because the picture is mixed and moving. Multiple proof-of-concept exploits and reproducible labs are already public. The threat-intelligence firm Previdian reported attempts against its own Alpine honeypot within hours of disclosure, including a root compromise. At the same time, the flaw is not in CISA's Known Exploited Vulnerabilities catalog, and as of early November there was no confirmation of broad in-the-wild attacks. Treat it as imminent, not as confirmed mass exploitation. [Our assessment]

The reason to move now is the shape of the thing. It is deterministic, not a race, and trivial to script. That is the profile that gets folded into mass scanners and botnets within days: expect Mirai-style sweeps of port 22 on Alpine, opportunistic cryptominers, and access brokers collecting footholds to resell. The targets will not be hardened flagship servers. They will be the CI runner, the forgotten appliance, the years-old base image in a regional fintech's stack.

Do this week

If you run musl anywhere, including in images

  1. 01Patch and restart, not just patch

    On Alpine, apk upgrade -U -a then rc-service sshd restart. A package upgrade without the restart leaves the old sshd running. Fixed versions start at OpenSSH 10.6p2 and the distribution backports.

  2. 02Rebuild the images, not just the hosts

    A patched host does nothing for a vulnerable container. Rebuild every musl image that ships sshd and redeploy; the running copy is what counts.

  3. 03Close it without waiting

    Set PasswordAuthentication no (test key login first) or build sshd with PAM, and lock service accounts with passwd -l so they carry ! rather than a bare *.

  4. 04Find the SSH servers you did not mean to ship

    Scan your registry for sshd in image layers. For most workloads the fix is to remove it and use docker exec or kubectl exec.

  5. 05Keep SSH off the open internet

    Restrict management SSH to a bastion or VPN, and audit which service accounts hold a locked password plus doas or sudo.

How to catch it

The signal most writeups reach for is password length. sshd does not log it, so chasing "long passwords" is a dead end. [Our assessment] The reliable signal is simpler and stronger: a successful password login to an account that should be key-only or has no password, with no failed attempts before it. A genuine password login almost always has a typo or two first; SSHole succeeds on the first connection. On Alpine 3.21 and newer the event comes from sshd-session, not sshd, so match both.

A detection pack you can paste

Three detections and the watchlist that feeds them. All defensive, all adapt to your pipeline.

bash
# 1) Build the watchlist: accounts that should never accept a password (locked = * or !).
#    Run per host and collect the names; feed them to the rules below.
grep -E ':\*:|:\!:' /etc/shadow | cut -d: -f1
bash
# 2) The anchor hunt: a password login to one of those accounts, from sshd or sshd-session.
grep -hE 'sshd(-session)?.*Accepted password for (alpine|root|<svc>)' \
  /var/log/messages /var/log/auth.log 2>/dev/null
Sigma
title: SSH password login to a key-only or locked account (SSHole)
status: experimental
logsource:
  product: linux
  service: sshd
detection:
  proc:
    Image|endswith: ['/sshd', '/sshd-session']
  event:
    Message|startswith: 'Accepted password for '
  accounts:
    Message|contains: '<your key-only or locked usernames>'
  condition: proc and event and accounts
level: high
falsepositives:
  - A genuinely password-enabled account you forgot to add to the watchlist
KQL
// Sentinel: one source IP, several hosts, zero failed attempts (scanner fingerprint).
Syslog
| where ProcessName in~ ("sshd", "sshd-session")
| where SyslogMessage has "Accepted password for"
| extend SrcIP = extract(@"from ([0-9a-fA-F:.]+)", 1, SyslogMessage)
| summarize hosts = dcount(HostName) by SrcIP
| where hosts >= 3

What it means for Latin America

The trap for teams across the region is to confirm they do not run password SSH on their servers and move on. The exposure was never on the servers you harden by hand. It is in the musl systems underneath: the Alpine images running fintech backends and internal tools, the OpenWrt router in a branch office, the IoT box in a warehouse, built from parent images assembled years ago and rarely re-examined. The thing that takes a regional platform down is rarely exotic. It is the forgotten sshd in a base image, reachable because someone mapped port 22 to debug something and never closed it.

Could this be you?

The test is simple, and most teams fail its first half: can you list, right now, every image and appliance you run that contains an SSH server, and say why each one needs it? If not, that inventory is the work, and it is what a compromise assessment and attack surface management are built to surface. If you want the detections above tuned and the watchlist kept current, that is detection engineering and threat hunting; and if you want someone to walk the path from an exposed service to root, that is a red-team engagement. We reproduced the root cause in a sealed lab and share the full harness and detection content with teams under NDA. Patch SSHole first. Then go find the SSH servers you did not know you were shipping.

5 sourcessshhole.com+4
  1. 01

    Özgün Kültekin, sshhole.com: the discoverer's disclosure, the three-decision root cause and the salt-borrowing detail.

    sshhole.com
  2. 02

    OpenSSH, release notes for 10.6p2: the fix that rejects a match on a stored field shorter than four characters.

    openssh.com
  3. 03

    SOCPrime, CVE-2026-123158 on Alpine Linux: preconditions, affected versions and the musl crypt() behaviour.

    socprime.com
  4. 04

    threatdefence, Alpine OpenSSH CVE-2026-123158: patching and hunting: the sshd-session logging change, the no-prior-failures signal and the hunts.

    threatdefence.com
  5. 05

    Help Net Security, exploited in the wild just hours after disclosure: the Previdian honeypot report and the KEV status.

    helpnetsecurity.com

Tags

  • #openssh
  • #sshole
  • #alpine
  • #containers
  • #authentication-bypass
  • #cve-2026-123158
  • #threat-intelligence
  • #detection

If you want a second pair of hands

Curious what our deliverables look like? Read a sample report.

Written by

Shadow Labs · Threat Intelligence

Shadow Labs is the research team behind Shadow Corp's penetration tests and incident response. We track the threats that reach Latin America and write guides that defenders can act on, with sources you can check.

Drafted with AI assistance and checked line by line against the primary sources cited here by a Shadow Labs editor before it went out, on November 6, 2026. The cover image was generated with AI. Read our editorial standards.

Spotted an error? Write to contact@sh4dowcorp.com and we will correct it publicly on this page.

From research to testing

Find out if this affects you.

Tell us what you want tested against this threat. We agree on scope on a short call. After the call, you get a written proposal within one business day.

Shadow Digest · Free preview

The blog explains. The Digest keeps you current.

This blog is public and evergreen: guides you can come back to. The Shadow Digest is our curated briefing for security teams. Every other Monday, Shadow Labs tells you what happened, whether it reaches Latin America, and what to do this week. Free during the preview; a paid plan for teams is coming.

By subscribing, you agree to receive the Shadow Digest by email (every other Monday, plus rare flash alerts). We email a confirmation link first. We store your address with our providers in the United States, and every email has a one-click unsubscribe link. See our privacy policy.