CVE-2026-123158 - OpenBSD OpenSSH Unexpected Status Code or Return Value Vulnerability

CVE-2026-123158

OpenSSH on musl libc (SSHole) - Login to Passwordless Accounts via a crypt() Error Return

What is OpenSSH?

OpenSSH is the implementation of the SSH protocol maintained by the OpenBSD project, and it is the remote administration channel for essentially the entire Unix world: servers, containers, network appliances, CI runners, and embedded devices. Its server component, sshd, authenticates incoming connections by public key, by password, by GSSAPI, or through PAM, depending on how the host is configured.

This CVE is not really about OpenSSH in isolation. It is about what happens when OpenSSH's password check meets musl libc, the small C library used by Alpine Linux and by a great many embedded builds based on OpenWrt, Buildroot, and Yocto. Alpine is the default base image for a large share of container workloads, which means the affected population includes a long tail of images that were built once, cached, and never rebuilt. Systems using glibc, such as Debian, Ubuntu, Fedora, and Red Hat Enterprise Linux, are not affected, nor are PAM-based configurations, Dropbear, or OpenBSD itself.

Overview

CVE-2026-123158, nicknamed SSHole, lets a remote attacker log in as an account that has no password at all, using any sufficiently long string as the password. It is a collision between two reasonable decisions made in different projects a decade apart.

When sshd is built without PAM, it verifies a password by calling crypt() with the submitted password and the salt from the account's shadow entry, then comparing the result against the stored field. For an account whose stored field is too short to contain a salt, OpenSSH has since 2016 borrowed the salt settings from another account, a deliberate choice intended to keep the timing of a failed login against a nonexistent or passwordless account indistinguishable from a real one, and so prevent username enumeration. Separately, musl's crypt() refuses keys longer than 256 bytes and signals that error by returning the string *.

The problem is that * is also the conventional shadow field for an account that has no usable password. So when an attacker submits a password between 257 and 1024 bytes against an account whose shadow field is *, musl returns *, sshd compares * against *, and the authentication succeeds. No guessing, no brute force, one connection. OpenSSH 10.6p2 fixed it on 2026-11-05 by rejecting stored hashes too short to be valid. A proof-of-concept was public within about four hours.

Affected Versions

Product Vulnerable Fixed
OpenSSH portable sshd built against musl libc without PAM All versions through 10.6p1 10.6p2
Alpine Linux edge openssh before 10.6_p2-r0 10.6_p2-r0
Alpine 3.24 / 3.23 / 3.22 / 3.21 10.3_p1-r1 / 10.2_p1-r0 / 10.0_p1-r10 / 9.9_p2-r0 and earlier 10.3_p1-r2 / 10.2_p1-r1 / 10.0_p1-r11 / 9.9_p2-r1
Alpine 3.20 to 3.16 (out of support, patched anyway) earlier package revisions 9.7_p1-r6 / 9.6_p1-r3 / 9.3_p2-r4 / 9.1_p1-r7 / 9.0_p1-r6
Alpine point releases before 3.21.10, 3.22.8, 3.23.8, 3.24.4 3.21.10, 3.22.8, 3.23.8, 3.24.4
Alpine tiny-cloud images (qcow2, VHD, AMI) 3.18.11 through 3.24.3 images built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 or later
Other musl-based builds (OpenWrt, Buildroot, Yocto) sshd without PAM, before 10.6p2 vendor rebuild on 10.6p2 or the backported patch

Technical Details

The CWE is CWE-394, unexpected status code or return value. In plain words: a library function used a valid-looking data value to report an error, the caller never distinguished "this is the answer" from "this is a failure notice," and the error value happened to be exactly the sentinel that means "no password set."

Exploitation requires a specific but very common combination, and all of it must hold at once:

  • sshd built without PAM, which is what Alpine's openssh-server package does by default, or openssh-server-pam running with UsePAM no
  • PasswordAuthentication yes, which is the OpenSSH default
  • at least one account whose shadow password field is exactly *, such as a key-only user, a user supplied by nslcd, winbind, or sssd, root on Alpine base images since roughly 3.16, or the alpine user in tiny-cloud images
  • at least one local account holding a real SHA-crypt hash, a $5$ or $6$ entry, because that is the account whose salt settings get borrowed

An account locked with ! rather than * is not reachable this way, and on a stock configuration PermitRootLogin prohibit-password keeps root out even where root's field is *. The attacker needs only the name of a * account and one connection.

CVSS 3.1 scores it 8.1 HIGH (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). The High attack complexity reflects the configuration preconditions, not any difficulty in the attack itself, which is a single login with a long string.

Discovery

The vulnerability was reported to OpenSSH by Ozgun Kultekin of Wakefield. Alpine's advisory additionally thanks Damien Miller and Darren Tucker for the OpenSSH fix and the 10.6p2 release, Timo Teras for the analysis, and Natanael Copa for building the Alpine packages. Independent research published under the sshhole.com banner arrived at the same class of bug through brute-force testing of roughly 17,600 unusual login attempts against each sshd build.

Alpine published its advisory on 2026-11-05 before any CVE identifier had been assigned, coordinated with the OpenSSH 10.6p2 release the same day. The CVE record was published on 2026-11-05 and the NVD entry followed.

Exploitation Context

This one moved unusually fast, and the public record changed within days. Analyses published on 2026-11-06 correctly reported no confirmed exploitation at that time; by 2026-11-09, when CISA listed the CVE, several independent observations existed.

BleepingComputer reports attempts beginning on 2026-11-05, the day the proof-of-concept appeared, and successful exploitation on 2026-11-06. GreyNoise logged the first confirmed successful chain at 00:46 UTC on 2026-11-07, about 40 hours after the fix, and has since recorded 16 successful exploitation chains from six source IPs, which it cautions are not representative of overall activity. Previdian recorded 20 attempts from 13 attacker IPs across nine countries and confirmed successful root access on an Alpine honeypot less than nine hours after CVE publication. Defused in Finland saw a small number of actors over the same weekend. watchTowr tied observed exploitation to botnet and cryptomining activity on 2026-11-06.

Post-compromise behaviour on GreyNoise sensors was reconnaissance of the system and any containers, queries to cloud metadata services, attempts to read password hashes and root SSH keys, and modification of authorized_keys for persistence. One intrusion installed a Python command-and-control implant GreyNoise calls TAC Agent, which supports shell execution, reconnaissance, file transfer, and self-update, has no built-in persistence (the attacker added a startup service), and whose comments and log strings are in Chinese. Its C2 was unreachable, so it never received tasking. No actor attribution has been made.

GreyNoise also recorded 27.5 million port-22 scans and 20.1 million attempted SSH sessions over the period, but explicitly does not classify those as SSHole attacks. No Shadowserver or Censys census of vulnerable hosts had been published as of 2026-11-09. CISA has not marked the entry for known ransomware use.

Remediation

  1. Update the OpenSSH package. On Alpine run apk upgrade -U -a, then restart the daemon with rc-service sshd restart. Upgrading the package alone leaves the vulnerable daemon running in memory, which is the most common way this fix gets missed.
  2. On non-Alpine musl builds (OpenWrt, Buildroot, Yocto, and embedded firmware generally), rebuild on OpenSSH 10.6p2 or apply the upstream patch. Expect this to be the slow tail: router and appliance firmware is the population least likely to be rebuilt.
  3. If you cannot update immediately, set PasswordAuthentication no, preferably in a drop-in file under /etc/ssh/sshd_config.d/. Validate the configuration and restart sshd while keeping an existing session open, so a mistake does not lock you out. This fully blocks the attack.
  4. Rebuild and redeploy container images rather than assuming you are covered. The real exposure here is images built or pinned before 2026-11-05: cached CI layers, copies in internal registries, and mirrored APK indexes. A running container is only at risk if it actually runs sshd, so inventory which images do.
  5. Replace running cloud instances launched from Alpine tiny-cloud images between 3.18.11 and 3.24.3, or apply the package update plus the password-auth mitigation to them. Those images ship an alpine user with a * password field and passwordless doas, which turns this bypass directly into root.
  6. Hunt for compromise. Check /var/log/messages for Accepted password for entries naming accounts that have no password, which is the clearest single indicator. Then review doas usage, recently created users and files, and every authorized_keys file on the host. Given the observed post-exploitation behaviour, also check for unexpected startup services and for cloud metadata access from the host.
  7. If a successful login cannot be ruled out, treat the machine as compromised: rebuild it, and rotate SSH keys, any credentials stored on it, and any cloud role credentials its metadata endpoint could have served. Preserve logs and system state first, in line with CISA's Forensics Triage Requirements under BOD 26-04.
  8. Federal civilian agencies must remediate or discontinue use by 2026-11-12. With a public proof-of-concept, confirmed root compromise in the wild, and a one-connection attack, everyone else should move on the same timescale.

Key Details

PropertyValue
CVE ID CVE-2026-123158
Vendor / Product OpenBSD - OpenSSH
NVD Published2026-11-05
NVD Last Modified2026-11-09
CVSS 3.1 Score8.1
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-394 find similar ↗
CISA KEV Added2026-11-09
CISA KEV Deadline2026-11-12
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 26-04 Deadline: 2026-11-12. Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA's BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA's "Forensics Triage Requirements" (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.

Timeline

DateEvent
2026-11-05OpenSSH 10.6p2 released with the fix; Alpine publishes its advisory and patched packages
2026-11-05A public proof-of-concept appears roughly four hours after the fix, and exploitation attempts begin the same day
2026-11-06First successful exploitation recorded; watchTowr ties observed attacks to botnet and cryptomining activity
2026-11-07GreyNoise logs the first confirmed successful in-the-wild exploitation at 00:46 UTC, about 40 hours after the fix
2026-11-09Added to CISA Known Exploited Vulnerabilities catalog
2026-11-12CISA BOD 26-04 remediation deadline