sshole: OpenSSH on Alpine and musl accepts any long password for locked accounts

sshole: OpenSSH on Alpine and musl accepts any long password for locked accounts

Every Unix admin learns the same rule early: put a * in an account’s password field and nobody can ever log in to it with a password, because no password hashes to *. On Alpine Linux and other musl-based systems running OpenSSH without PAM, that rule quietly stopped being true. Send a password longer than 256 bytes, and the C library’s crypt() fails, returns * as its error value, and sshd compares that to the stored *. Match. You’re in.

The researcher who found it, Özgün Kültekin of Wakefield, calls it “sshole”. It was fixed in portable OpenSSH 10.6p2 on November 5, 2026, is tracked as CVE-2026-123158, and CISA added it to the Known Exploited Vulnerabilities (KEV) catalog on November 9 (I checked both NVD and CISA directly). The exposure is narrow, but where it applies it’s an unauthenticated remote login, and the patch does nothing until you restart sshd.

Severity: high. Rare configuration, trivial exploit, exploited in the wild, and a long tail of embedded boxes that will never see the fix.

At a glance

  • CVE: CVE-2026-123158 (confirmed in NVD, published November 5, 2026; CNA is MITRE). Weakness: CWE-394, unexpected status code or return value.
  • CVSS 3.1: 8.1 High from the CVE record (AC:H). Red Hat’s preliminary score is 9.8 Critical (AC:L). NVD has not published its own score.
  • Affected: sshd before 10.6p2 on Linux, linked against musl libc, running without PAM, with password authentication enabled. Alpine’s default openssh-server package fits. So can OpenWrt, postmarketOS, Void (musl), Chimera and musl-based Buildroot or Yocto builds.
  • Not affected: glibc distributions (Debian, Ubuntu, Fedora, RHEL), OpenSSH with PAM, Dropbear, OpenBSD, FreeBSD, macOS.
  • Exploitation: confirmed in CISA KEV (added November 9, 2026, federal due date November 12). Previdian (on a honeypot) and GreyNoise report successful attacks.
  • Fix: OpenSSH 10.6p2 or your distribution’s patched package, then restart sshd. Workaround: PasswordAuthentication no.
  • Who should care: anyone running Alpine VMs or cloud images with SSH open, sshd-in-a-container images built on Alpine, and anyone shipping or operating embedded Linux on musl.

What we know

According to Wakefield, Kültekin found the bug on November 3, 2026 and reported it privately to the OpenSSH team, which had a patch back in under an hour. Alpine and musl maintainers were told on November 4. On November 5, Damien Miller announced OpenSSH 10.6p2 on oss-security, Alpine published fixed packages for every branch back to 3.16, and the research went public.

The OpenSSH maintainers were careful about blame. The fix commit says they “do not consider the root cause to be within OpenSSH,” but sshd is where it gets exploited, so that’s where they stopped it.

Then it moved fast. GreyNoise puts the first public exploit on GitHub at 13:16 UTC on November 5, about four hours after the release. On November 6, Help Net Security reported that threat intel firm Previdian saw its first attempt “less than nine hours after CVE publication”: eight attempts from one Japan-based IP that got root on an Alpine honeypot and ran id, uname and hostname over non-interactive SSH. GreyNoise dates the first successful exploitation it observed to 00:46 UTC on November 7. CISA’s KEV entry followed on November 9.

Timeline from November 3 to November 9, 2026: private report, maintainers notified, OpenSSH 10.6p2 release, first public exploit and CVE publication, first successful exploitation, CISA KEV listing.
Six days from private report to CISA KEV. Times in UTC from GreyNoise; earlier dates from Wakefield.

How it works

I like this bug because nobody wrote it. It came from three reasonable decisions in three projects, years apart, as the researcher’s write-up lays out.

First, musl in August 2012. POSIX lets crypt() return NULL on failure, and plenty of callers never check, so they crash. musl chose to return the string * on failure instead, which is safe as long as nobody’s stored hash is *. A few weeks later musl added SHA-256 and SHA-512 crypt with a 256-byte key cap (KEY_MAX) to stop denial-of-service with huge inputs. Anything longer fails, and failure now means *.

Second, OpenSSH in July 2016 (7.3p1). To close a timing side channel that let attackers enumerate users (CVE-2016-6210 is cited), sshd started choosing a realistic salt for accounts without a usable hash, so their failed logins cost the same as real ones. All the advisories require a local account with a $5$ or $6$ hash (SHA-256 or SHA-512 crypt). My reading, which the write-ups imply but don’t spell out, is that this hash supplies the salt that sends the attacker’s password into musl’s capped SHA-crypt code.

Third, Alpine in 2022. After CVE-2019-5021 (Docker images that shipped root with no password), Alpine had set root’s field to !. In 3.16 it changed root to * so SSH key logins kept working without PAM. Key-only users, directory users via musl-nscd and the alpine user on tiny-cloud images also carry *.

Put those together: the attacker sends a 257 to 1,024 byte password for a * account, crypt() fails and returns *, and the comparison against the stored field succeeds. The bug class is the interesting part. An error value that can also be a valid result is the same mistake as in-band signalling, and CWE-394 is the right label for it. The fix is just as blunt: sshd now refuses to compare against any stored hash shorter than four characters (MIN_PASSWORD_HASH_LEN).

Four-step diagram: attacker targets an account whose password field is a star, sends a 257 to 1024 byte password, musl crypt() fails and returns a star, sshd compares star to star and accepts the login.
The bypass in four steps: musl's error value matches the locked-account marker.

The sources disagree on small details. The CVE text says 256 to 1024 characters; Alpine and Wakefield say 257 to 1,024 bytes. Alpine describes a login “in one connection, every time,” while the researcher’s write-up and a Medcrypt follow-up on oss-security (November 9) say a prior failed attempt may be needed. For defenders that changes nothing.

Who is affected and how badly

Every condition has to hold: musl, no PAM, password authentication on, a * account, and a real SHA-crypt hash somewhere. That sounds like a long list, but on Alpine it’s mostly defaults. PasswordAuthentication yes is OpenSSH’s default, root ships as root:*, and the stock openssh-server package has no PAM. The usual missing piece is the $6$ hash, and one passwd run by a human is enough to add it.

Root itself is protected by the default PermitRootLogin prohibit-password. Other * accounts that can escalate are not. The clearest case is Alpine’s official cloud images (qcow2, VHD and AMI from 3.18.11 through 3.24.3), which ship an alpine user with a * password and passwordless doas. Alpine says they’re safe on first boot and become exploitable once any $6$ hash exists, for example a console password or hashed_passwd in cloud-init user-data. Images built from the fixed point releases (3.21.10, 3.22.8, 3.23.8, 3.24.4) include the fix, but instances you already launched don’t get it.

Containers are a split case. Alpine says plainly that containers that don’t run sshd aren’t affected, and that’s most of them. The ones that do are images whose whole job is SSH: bastion containers, SFTP drop boxes, CI and lab images, things like panubo/docker-sshd, where a user opened an upgrade request on November 7. Any such image that bakes in a password user supplies the hash, and none of them patch themselves. Somebody has to rebuild and redeploy.

Then there’s embedded. Medcrypt reproduced it on a stock Yocto image with no unusual configuration, and flagged musl, no PAM, passwords on and locked service accounts as a common embedded baseline. Dropbear is not affected, so only builds that ship OpenSSH are in scope. I have no source for how many vulnerable hosts are internet-reachable, and I won’t guess. GreyNoise suggests attacks are still rare: as of November 14, 14:41 UTC, it lists 44 confirmed post-exploitation chains from 10 attacker IPs in 7 countries, against tens of millions of ordinary SSH connections. Some of the page’s totals don’t reconcile, so treat them as rough.

Two-column checklist. Left: six conditions that must all hold for exposure (musl, no PAM, password auth on, a star account, a SHA-crypt hash, unpatched or unrestarted sshd). Right: configurations not affected.
Exposure checklist, based on the Alpine advisory and Wakefield research.

What to do now

  1. Find musl sshd. On each host or image, ldd "$(command -v sshd)" | grep -i musl tells you the libc. On Alpine, apk info -e openssh-server-pam tells you whether the PAM build is installed. Remember that the PAM build is only safe with UsePAM yes.
  2. Check the effective config, not the file: sshd -T | grep -i passwordauthentication. Match blocks and drop-ins can turn it back on.
  3. Upgrade. Alpine’s fixed openssh versions: 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, 3.16 9.0_p1-r6. For your own builds, Wakefield says the upstream patch applies to every release from 7.3p1 onward.
  4. Restart sshd: rc-service sshd restart on OpenRC. Alpine is explicit that upgrading does not restart the running daemon, so the old code keeps accepting the long password. A quick way to find the stragglers (my suggestion, not Alpine’s) is to check whether the listener’s /proc/<pid>/exe points at a deleted file, or whether its start time is older than the package install.
  5. If you can’t patch tonight, turn passwords off. Alpine’s recipe is a drop-in at /etc/ssh/sshd_config.d/00-no-passwords.conf with PasswordAuthentication no (the drop-in directory is read from 3.19 onward), then sshd -t and a restart. Confirm key login works first and keep your current session open.
  6. Rebuild SSH-bearing container images from a fixed base and redeploy them. Pulling a new tag does nothing to containers that are already running.
  7. Turn any * account that should be unusable into !, which Alpine lists as not affected. Get rid of PermitRootLogin yes where you can.

Detection and monitoring

sshd doesn’t log password contents or length, and the traffic is encrypted, so the overlong password itself is invisible. What you can see is the result and what attackers did next. I wrote five Sigma rules on two kinds of telemetry: the sshd log, which every host has, and process creation (auditd, Falco, Tetragon or an EDR), which many Alpine servers and nearly all embedded devices don’t. The post-exploitation rules are built on what GreyNoise captured on compromised Alpine hosts on November 7 and 8, 2026: a doas -n probe, a Python C2 agent called TAC Agent, a second sshd on port 2222 with TCP forwarding, and an OpenRC service for persistence.

RuleCategoryLog sourceATT&CKLevel
Password login to root or alpineEmerging threatlinux / sshdT1190, T1078.003High
TAC Agent implant activityEmerging threatlinux / process_creationT1059.006, T1071.001, T1543High
Extra sshd listener with forwardingGeneric TTPlinux / process_creationT1572High
OpenRC script from /tmp or rc-update addGeneric TTPlinux / process_creationT1543Medium
Non-interactive doasHuntinglinux / process_creationT1548.003Low

The one to turn on today is the first. Alpine ships root and the cloud-image alpine user with * in /etc/shadow, so neither has a password, and a password login to either is the signal Wakefield and Alpine both point to. Scope it to your Alpine and musl hosts, because on glibc distributions a root password login can be legitimate. Other * accounts (key-only users, musl-nscd directory users) need a per-host lookup, which I cover in the companion post.

title: Potential CVE-2026-123158 Exploitation - SSH Password Login To Root Or Alpine Account
id: 2e635140-37d2-48cd-913d-ee473f0b36f9
status: test
description: |
    Detects a successful sshd password login for the "root" or "alpine" account. On Alpine Linux both ship with "*"
    in /etc/shadow and have no password, so on a musl-based sshd without PAM a password login to them is the main
    sign of sshole (CVE-2026-123158) exploitation. Scope this rule to Alpine and other musl hosts.
references:
    - https://alpinelinux.org/posts/2026-11-05-openssh-password-authentication-bypass/
    - https://wakefield.co/research/openssh-musl-authentication-bypass
    - https://nvd.nist.gov/vuln/detail/CVE-2026-123158
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.initial-access
    - attack.t1190
    - attack.t1078.003
    - cve.2026-123158
    - detection.emerging-threats
logsource:
    product: linux
    service: sshd
detection:
    keywords:
        - 'Accepted password for root from'
        - 'Accepted password for alpine from'
    condition: keywords
falsepositives:
    - Hosts where an admin set a real root password and enabled PermitRootLogin yes (common on glibc distributions, rare on Alpine)
    - Alpine hosts where the alpine user was deliberately given a password
level: high

If it fires, treat the box as compromised and check doas use, new users, new files, /etc/hosts, /etc/init.d and authorized_keys. For monitoring, retro-hunt sshd logs back to November 5, 2026, 09:00 UTC, when the bug went public. On Alpine the log is /var/log/messages, written by busybox syslogd, which keeps it local and rotates it small, so if you don’t forward logs, collect them now before they roll over. Keep the first rule running after patching: a hit later means an sshd somewhere that was never upgraded or never restarted. The attacker IPs from Previdian and GreyNoise are for retro-hunts only; GreyNoise warns that some belong to compromised legitimate hosts, and they will age fast.

I wrote up all five rules, with tuning notes, a host-level check and ATT&CK coverage, in a separate detection post. The YAML lives in my Detection Rules repo.

My take

Is this overhyped? For most fleets, a bit. If you run glibc distributions with PAM, you can stop reading. Even on Alpine, root stays safe by default, and the realistic path in needs a second account. The 8.1 score is closer to the truth than 9.8, because the prerequisites are real.

Where it’s underrated is the long tail. Alpine servers will get patched this week by people who read advisories. Yocto and Buildroot appliances with OpenSSH, musl and a locked service account will sit on networks for years, and I expect many of their vendors never to ship a fix. If you build embedded Linux, don’t stop at bumping OpenSSH. Look for every place your stack treats a magic string as “impossible”.

The broader lesson is about sentinel values. musl’s choice to return * was defensive, meant to stop crashes in careless callers. It became a hole because it matched another convention for “no password”. Nobody owned that interaction, so the flaw sat between three codebases from 2016 to 2026. What I’d do first: a fleet-wide sshd -T sweep for passwordauthentication yes, tonight. On boxes that only ever use keys, password auth shouldn’t be on at all.

Sources

One thought on “sshole: OpenSSH on Alpine and musl accepts any long password for locked accounts”

Leave a Reply