CVE-2026-123158 OpenSSH Vulnerability: musl Authentication Bypass

A flaw in OpenSSH interactions with the musl C library (CVE-2026-123158) allows remote attackers to bypass password authentication on Alpine Linux and container workloads. Immediate patching and restarting sshd are

TL;DR

  • The Vulnerability: Tracked as CVE-2026-123158 (CVSS 8.1, dubbed ‘sshole’), an authentication bypass in OpenSSH allows unauthenticated attackers to log into password-disabled accounts using any password string between 257 and 1,024 bytes long.
  • Affected Systems: OpenSSH versions prior to 10.6p2 running on musl-based Linux distributions without Pluggable Authentication Modules (PAM). Alpine Linux default installations, OpenWrt, Buildroot, Yocto, and Alpine-based container images are vulnerable. Glibc systems (Debian, Ubuntu, RHEL) are immune.
  • Root Cause: A side-channel defence against timing attacks (CVE-2016-6210) implemented in OpenSSH in 2016 collides with a 2012 error-handling behaviour in musl’s crypt() function. When musl receives an oversized password, it returns an asterisk (*), matching the * hash marker stored for password-disabled accounts in /etc/shadow.
  • Active Exploitation: Observed in the wild less than nine hours after disclosure. Threat intelligence firm Previdian confirmed root compromise on an Alpine Linux honeypot from source IP 89.116.89[.]18.
  • Remediation: Upgrade to OpenSSH 10.6p2, explicitly restart the sshd daemon process, or set PasswordAuthentication no in sshd_config.

On 5 November 2026, OpenSSH released version 10.6p2 to fix a severe authentication bypass vulnerability tracked as cve-2026-123158 and carrying a CVSS v3 score of 8.1. Disclosed by security researcher Özgün Kültekin and dubbed ‘sshole’ (or ‘*sshole’), the flaw allows unauthenticated remote attackers to gain shell access to local Linux accounts configured with password logins disabled. The vulnerability requires no prior authentication, no stolen credentials, and no SSH private keys; it executes cleanly in a single TCP connection.

The flaw is rooted in a subtle logic glue failure between OpenSSH’s application-level timing attack defences and the C standard library implementation used by the host operating system. Specifically, the vulnerability manifests only when OpenSSH runs on Linux distributions using the musl C library without Pluggable Authentication Modules (PAM) compiled or enabled. While systems relying on the GNU C Library (glibc)—such as Ubuntu, Debian, Fedora, and Red Hat Enterprise Linux—are completely unaffected, musl-native environments like Alpine Linux, OpenWrt, Buildroot, and Yocto are exposed in their default configurations.

Exploitation activity began almost immediately after disclosure. According to reporting from The Hacker News, threat intelligence firm Previdian observed automated exploitation attempts against public-facing sensors less than nine hours after publication, confirming a full root compromise on an Alpine Linux honeypot. Given the widespread reliance on Alpine Linux across modern containerized architectures and cloud platform base images, platform security teams must urgently assess their exposure, deploy updated packages, and verify service restarts.

Executive summary: Dissecting the CVE-2026-123158 OpenSSH flaw

CVE-2026-123158 represents an architectural edge-case vulnerability where two individually intentional software design decisions combine to create an unintended authentication bypass. The vulnerability affects all OpenSSH releases prior to version 10.6p2 when executed in an environment that satisfies three specific operating criteria: the underlying system uses the musl C library, authentication is handled natively by sshd rather than through PAM, and password authentication remains enabled in the SSH daemon configuration.

The security impact is particularly acute in cloud-native and embedded operating ecosystems. Alpine Linux, which uses musl as its system C library, ships its default openssh-server package without PAM integration. Consequently, default Alpine deployments—including cloud instances deployed on Amazon Web Services (AWS) and Microsoft Azure using tiny-cloud images (versions 3.18.11 through 3.24.3)—are exposed. Because these specific cloud images ship with a default alpine user configured with passwordless doas root privileges, exploiting CVE-2026-123158 grants an unauthenticated attacker instantaneous, full host takeover.

Critical Threat Reality

Exploitation of CVE-2026-123158 is deterministic and requires zero brute-force iterations. A single SSH connection carrying an oversized password payload bypasses password verification instantly for targeted accounts. Threat actors actively exploited this vulnerability in the wild within nine hours of public patch disclosure.

The severity of CVE-2026-123158 stems from the complete collapse of access controls on affected accounts. Any account configured with an asterisk (*) in its /etc/shadow entry—a standard Unix convention indicating that password authentication is disabled—can be logged into using any arbitrary password string between 257 and 1,024 bytes in length. This affects administrative accounts, deploy users designed solely for SSH key access, and accounts managed via local directory services.

Root cause mechanics: The collision between musl crypt() and OpenSSH side-channel defences

To understand how CVE-2026-123158 operates, system architects must examine the historical context of two distinct software components: OpenSSH’s username enumeration defences added in 2016 and musl’s C library password hashing routines established in 2012.

1. OpenSSH timing attack mitigations (CVE-2016-6210)

In 2016, OpenSSH addressed CVE-2016-6210, a side-channel timing attack that allowed remote attackers to determine whether a given username existed on a target system. When an client attempted to log in as a non-existent user or an account lacking a valid password hash, sshd previously returned an authentication failure almost instantaneously because it skipped the computationally expensive password hashing process.

To neutralize this timing differential, OpenSSH developers introduced a mechanism: when sshd evaluates an account that lacks a valid password hash (indicated in /etc/shadow by a string such as * or !), it does not abort authentication immediately. Instead, sshd borrows a valid salt string from another existing local account on the system and processes the client-supplied password through the system’s crypt() function anyway. This ensures that the CPU time spent processing invalid or non-existent accounts matches the time spent processing valid accounts, preventing timing-based username enumeration.

2. The musl library 256-byte limit and error code

Independently, since 2012, the musl C library has enforced an explicit length limit on password inputs processed by its internal crypt() implementation for SHA-256 ($5$) and SHA-512 ($6$) hashing algorithms. If an application passes a password string exceeding 256 bytes (specifically between 257 and 1,024 bytes) to musl’s crypt() function, the library considers the input invalid, aborts the hashing calculation, and returns a static single-character error string: "*".

3. The fatal glue logic failure

When an attacker initiates an SSH session targeting an account configured with a * in /etc/shadow (such as the default alpine user or a key-only SSH deployment account), the following sequence of events occurs inside the unpatched sshd process:

  1. The attacker submits an SSH authentication request containing an arbitrary password string of 300 bytes.
  2. sshd reads /etc/shadow for the requested account and finds the stored hash field set to "*".
  3. Applying the CVE-2016-6210 side-channel mitigation, sshd selects a valid salt from another local system account and calls crypt(supplied_password, borrowed_salt).
  4. The musl C library receives the 300-byte password, exceeds its internal 256-byte limit, aborts hashing, and returns the error string "*".
  5. sshd receives the returned string "*" from crypt() and compares it directly against the target account’s stored password hash string from /etc/shadow (which is also "*").
  6. Because strcmp("*", "*") evaluates to zero (a match), sshd incorrectly concludes that the client provided a valid password and grants full authenticated access.
+-----------------------------------------------------------------------------------+
|                            CVE-2026-123158 EXECUTION TRACE                        |
+-----------------------------------------------------------------------------------+

 Attacker                        OpenSSH sshd                     musl C Library
    |                                 |                                 |
    |-- 1. Login ('alpine', 300B) --->|                                 |
    |                                 |-- 2. Reads /etc/shadow ("*") -->|
    |                                 |                                 |
    |                                 |-- 3. Borrow salt & call -------->|
    |                                 |      crypt(300B_pass, salt)     |
    |                                 |                                 |
    |                                 |                                 |-- 4. Pass > 256B:
    |                                 |<-- 5. Returns error "*" ---------|      Aborts hash,
    |                                 |                                         returns "*"
    |                                 |-- 6. Compares returned "*"
    |                                 |      with stored shadow "*"
    |                                 |
    |                                 |-- 7. MATCH! ("*" == "*")
    |<-- 8. Access Granted (Shell) ---|
    |                                 |

The bug represents an overloading of the asterisk character: OpenSSH treats * in /etc/shadow as a system marker disabling password access, whereas musl uses * as an operational error return string. When OpenSSH compares musl’s error output against the shadow file marker, the system fails open.

Attack prerequisites and affected platform scenarios

Exploitation of CVE-2026-123158 is highly specific to the system configuration. The vulnerability cannot be triggered indiscriminately against any SSH server; explicit environment conditions must be met simultaneously.

Mandatory attack prerequisites

For an attack to succeed against a target server, all of the following structural prerequisites must be present:

  • Vulnerable Software Version: OpenSSH server (sshd) running a version prior to 10.6p2.
  • Target C Library: The binary must be compiled against and linked to the musl C library.
  • Absence of PAM: The OpenSSH binary must not use Pluggable Authentication Modules for password processing. PAM frameworks handle password validation via independent pipeline logic, avoiding direct string comparisons of raw crypt() output against shadow files.
  • Enabled Password Authentication: The SSH daemon configuration (sshd_config) must have PasswordAuthentication yes enabled (which remains the default configuration in stock OpenSSH builds).
  • Target Account Configuration: At least one local user account must exist with its password field set strictly to * in /etc/shadow.
  • Secondary Account Presence: At least one other local account on the system must contain a valid, usable password hash (e.g. SHA-256 or SHA-512) to allow sshd to borrow a valid salt for the dummy hash routine.

Affected vs. immune platform matrix

Because the vulnerability relies on musl-specific library behaviours, major Linux distributions exhibit stark differences in vulnerability exposure.

Platform / Operating System Standard C Library Default PAM Integration Vulnerable in Default State?
Alpine Linux (Standard) musl No Yes (if PasswordAuthentication yes)
Alpine AWS/Azure Cloud Images musl No Yes (Default alpine user exposed)
OpenWrt musl No Yes (If running OpenSSH instead of Dropbear)
Buildroot / Yocto Custom Linux musl No Yes (If built with OpenSSH, no PAM)
Ubuntu / Debian glibc Yes No (Immune)
RHEL / CentOS / Fedora glibc Yes No (Immune)
OpenBSD BSD libc N/A No (Immune)
Dropbear SSH Server Any N/A No (Immune – different codebase)

Glibc Immunity Mechanism

Systems running the GNU C Library (glibc) are immune because glibc’s crypt() implementation does not return a single * character upon receiving oversized password strings. Glibc either processes larger buffer inputs safely or outputs distinct error formats that do not collide with Unix shadow account disable markers.

In-the-wild exploitation telemetry and threat intelligence

Threat intelligence findings confirm that malicious actors moved rapidly to operationalise CVE-2026-123158 following its public disclosure on 5 November 2026.

Previdian sensor telemetry

According to threat intelligence firm Previdian, automated exploitation attempts began appearing in network sensors less than nine hours after OpenSSH published version 10.6p2 and security researcher Özgün Kültekin released advisory details. Previdian confirmed successful root compromise on an unpatched honeypot running stock Alpine Linux and OpenSSH.

Observed attack telemetry captured by Previdian revealed the following operational metrics:

  • Source IP Address: 89.116.89[.]18 (Geolocated to Japan).
  • Exploit Payload Structure: Single SSH login attempts sending oversized password buffers (between 257 and 1,024 bytes) aimed at accounts with disabled password fields.
  • Post-Exploitation Execution: Immediate execution of non-interactive SSH sessions running initial reconnaissance commands: id, uname, and hostname.
  • Attack Volume: Initial telemetry logged eight distinct exploitation attempts originating from the single Japanese source IP targeted at sensor endpoints.

At the time of writing, the broader motives, threat actor attribution, and total campaign scale associated with IP address 89.116.89[.]18 remain unconfirmed. Furthermore, while private threat intelligence providers like Previdian have added CVE-2026-123158 to their active exploitation tracking lists, the exact timeline for its formal inclusion in the US Cybersecurity and Infrastructure Security Agency (CISA) Known Exploited Vulnerabilities (KEV) catalog has not been disclosed.

Accelerated vulnerability research timelines

The swift window between public patch release and active field exploitation highlights a shift in threat actor capabilities. In disclosure notes, researcher Özgün Kültekin indicated using automated agent swarms to execute over 17,600 unique login attempts across varied compiler and C library permutations to isolate the flaw. While specific technical details regarding the researcher’s automated agent swarm framework remain undisclosed, the rapid weaponisation of the bug by external threat actors demonstrates that adversaries deploy similar automated scanning pipelines to analyze public patches and generate working exploits within hours.

Container and cloud exposure: Alpine Linux, Docker, and cloud-init images

The blast radius of CVE-2026-123158 is heavily concentrated in cloud-native containerized infrastructure and lightweight cloud virtual machines. Alpine Linux is widely utilized across engineering teams due to its minimal base image size (often under 6 MB). However, this minimalism means Alpine omits heavy dependencies like PAM, making its native OpenSSH package vulnerable out of the box.

Official cloud image vulnerability: AWS and Azure

The vulnerability poses extreme risk to official Alpine Linux cloud images deployed in public cloud environments. Specifically, official Alpine Linux images built for AWS and Azure utilizing the tiny-cloud initialization framework (releases 3.18.11 through 3.24.3) ship with a pre-configured local account named alpine.

This alpine account features two critical configurations:

  1. Its /etc/shadow entry is set to *, intending to restrict access strictly to SSH key pairs configured during cloud instance provisioning.
  2. The account is granted full, passwordless administrative privilege escalation via doas (Alpine’s lightweight alternative to sudo).

When an attacker targets an unpatched Alpine cloud instance, CVE-2026-123158 allows immediate login to the alpine user by supplying an oversized password. Once shell access is established, the attacker executes doas su - to achieve instant root compromise without ever encountering a valid password prompt.

# Conceptual attack chain against an Alpine cloud image
$ ssh alpine@<target-host>
# [Attacker supplies 300-byte password string]
# sshd validates 300B password -> musl returns "*" -> matches /etc/shadow "*"
Welcome to Alpine Linux!

alpine:~$ doas su -
root:~# id
uid=0(root) gid=0(root) groups=0(root)

Container microservices exposure

In containerized environments, Alpine Linux is frequently chosen as a lightweight base image (e.g., alpine:latest, python:3.11-alpine). If a container image installs openssh-server to facilitate remote management, debugging, or automated file transfers via SFTP, and leaves PasswordAuthentication yes enabled, that container is exposed to remote execution.

Unquantified Third-Party Image Risk

The total number of third-party public images on Docker Hub incorporating vulnerable Alpine OpenSSH configurations has not been disclosed or fully audited. Platform engineering teams must assume any internal or third-party container running OpenSSH on musl is vulnerable until verified.

Detection engineering: Uncovering exploitation attempts in log data

Detecting exploitation attempts related to CVE-2026-123158 requires auditing system authentication logs, monitoring privilege escalation mechanisms, and examining post-exploitation host artifacts.

1. Log parsing for anomalous SSH acceptances

On Alpine Linux and musl-based hosts, OpenSSH logs authentication events to /var/log/messages or syslog. Security operations teams should monitor log pipelines for entries indicating successful password authentication for accounts that should never accept passwords (such as alpine, root, or key-only deployment users).

Run the following safe diagnostic search on exposed hosts to identify suspicious authentication successes:

# Search syslog messages for accepted password logins on key-only or default accounts
grep -E "sshd\[.*\]: Accepted password for (alpine|root|deploy|sshd)" /var/log/messages

A log line matching the following structure indicates an exploitation attempt:

Nov  5 18:22:10 alpine-node sshd[1420]: Accepted password for alpine from 89.116.89.18 port 48212 ssh2

2. Monitoring privilege escalation logs

Because post-exploitation activity frequently involves escalation from a compromised default user to root, security analysts should inspect doas and sudo execution logs for non-interactive commands or unexpected shell spawns:

# Inspect doas execution logs on Alpine systems
grep "doas:" /var/log/messages | grep "root"

Attacker activity identified by Previdian specifically involved non-interactive SSH execution of basic reconnaissance binaries. Query SIEM or host telemetry for rapid execution chains following an SSH login event:

# Target commands observed in threat intelligence telemetry
id
uname -a
hostname

3. Host artifact and persistence checks

If an unverified successful password login is detected for a password-disabled account, treat the system as compromised. Conduct the following forensic inventory immediately:

  • Check SSH authorized keys files for newly injected public keys:
    cat /root/.ssh/authorized_keys
    cat /home/*/.ssh/authorized_keys
    
  • Inspect /etc/passwd and /etc/shadow for newly created local user accounts or modified shadow hashes.
  • Audit active network connections and background processes using netstat or ss alongside ps aux.

Practical remediation and mitigation architecture

Remediating CVE-2026-123158 requires a two-step operational workflow: applying updated binary packages and restarting the active SSH daemon process.

Step 1: Upgrading OpenSSH packages

Alpine Linux released patched OpenSSH packages across all supported distribution branches (from Alpine 3.16 up to edge) on 5 November 2026. Update system repository indexes and upgrade the openssh package suite using apk:

# Update package indices and upgrade OpenSSH on Alpine Linux
# Test in staging environments prior to production rollout
apk update
apk add --upgrade openssh openssh-server openssh-client

Step 2: Restarting the sshd service (CRITICAL)

Simply updating the OpenSSH package on disk via apk upgrade does not secure a running server. The active sshd daemon process remains running in system memory, executing the vulnerable binary code compiled against musl.

Mandatory Operational Step

Package updates leave existing sshd listener processes vulnerable until the service is restarted. You must explicitly restart sshd immediately following package installation to flush unpatched binaries from memory.

Restart the OpenSSH daemon using OpenRC (standard on Alpine Linux):

# Restart sshd service via OpenRC
rc-service sshd restart

# Alternatively, on systemd-based musl distributions:
systemctl restart sshd

Verify that the newly spawned parent sshd process reflects the patched release version:

# Confirm running OpenSSH version
sshd -V

Step 3: Configuration workaround (Immediate Mitigation)

If upgrading OpenSSH binaries or rebuilding container images cannot be executed immediately, OpenSSH developer Damien Miller advised implementing an immediate configuration workaround: disable password authentication globally across all musl systems.

Edit /etc/ssh/sshd_config (or a drop-in configuration file in /etc/ssh/sshd_config.d/) and set the following directives:

# /etc/ssh/sshd_config
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes

Reload or restart the SSH service to enforce key-only authentication:

# Reload sshd configuration
rc-service sshd reload

Disabling PasswordAuthentication completely bypasses the vulnerable crypt() code path inside sshd, rendering the exploit completely ineffective even on unpatched OpenSSH builds.

Container image rebuild strategy

For containerized applications, updating running containers in-place is an anti-pattern. DevOps engineers must update base Dockerfiles to force rebuilds with refreshed package indexes, ensuring base musl libraries and OpenSSH instances are patched.

# Example Dockerfile remediation pattern
FROM alpine:3.20

# Force package index update and upgrade OpenSSH to 10.6p2 or higher
RUN apk update && \
    apk add --no-cache openssh-server >= 10.6p2-r0 && \
    sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

Strategic engineering lessons: Edge cases in cryptographic glue code

CVE-2026-123158 provides a valuable case study in architectural resilience and integration engineering. It illustrates how defensive side-channel patches implemented at the application level can interact unexpectedly with lower-level standard library implementations.

When OpenSSH developers introduced the dummy hashing routine to mitigate CVE-2016-6210, the logic relied on an implicit assumption: that calling crypt() with an invalid password or dummy salt would produce a standard, non-matching hash string. The implementation did not account for library-specific error mechanisms—such as musl returning a static single-character indicator (*)—that match the exact string convention used by Unix shadow files to mark accounts as password-disabled.

+-----------------------------------------------------------------------------------+
|                        THE INTERFACE CONTRACT MISMATCH                            |
+-----------------------------------------------------------------------------------+

 Application Layer (OpenSSH):
   - Shadow File Marker for Disabled Account: "*"
   - Expectation: crypt() returns a unique string hash or safe failure code.

 C Library Layer (musl libc):
   - Input Validation: Password length > 256 bytes is invalid.
   - Error Output Contract: Return static string "*" on validation failure.

 RESULT:
   OpenSSH compares musl output ("*") against shadow marker ("*").
   Application interprets library error as valid credential authentication.
+-----------------------------------------------------------------------------------+

This vulnerability highlights several critical principles for platform architects and C systems programmers:

  • Implicit Library Contracts: Application code relying on standard POSIX APIs (such as crypt()) must not assume uniform behaviour across C standard library implementations (glibc, musl, uClibc, FreeBSD libc). Error return formats must be handled explicitly rather than compared directly against data inputs.
  • Cross-Environment Integration Testing: Automated test suites must evaluate cryptographic glue logic across diverse operating systems and C libraries. As demonstrated by researcher Özgün Kültekin’s agent swarm testing across thousands of build variations, vulnerabilities often exist exclusively in non-standard or lightweight target configurations.
  • Defense-in-Depth: Relying on disabling passwords at the account level (via /etc/shadow markers) while keeping global SSH password authentication enabled leaves systems exposed to application logic errors. Enforcing global protocol restrictions (PasswordAuthentication no) provides a robust security layer.

Key takeaways for infrastructure and security leaders

To ensure infrastructure environments are protected against CVE-2026-123158, engineering and security leadership should verify the following operational actions:

  • Inventory musl Environments: Identify all Alpine Linux cloud instances (AWS, Azure, GCP), embedded deployments (OpenWrt, Yocto, Buildroot), and Alpine-based container images across internal registries.
  • Enforce Global SSH Key Authentication: Update configuration management tools (Ansible, Puppet, Terraform/cloud-init) to set PasswordAuthentication no across all SSH daemons globally.
  • Patch and Flush Memory: Ensure package manager updates (to OpenSSH 10.6p2) are immediately paired with explicit service restarts (rc-service sshd restart) to flush unpatched binaries from active memory.
  • Audit Cloud Base Images: Review cloud instance initialization scripts, specifically Alpine tiny-cloud images, to ensure default accounts with elevated doas privileges are secured or removed.
  • Incorporate SIEM Detection Rules: Deploy log queries scanning /var/log/messages for unauthorized Accepted password events associated with key-only or default local users.

Frequently asked questions

What makes CVE-2026-123158 different from standard SSH brute-force vulnerabilities?

Standard SSH brute-force attacks rely on guessing valid user passwords over thousands of connection attempts. CVE-2026-123158 is a deterministic authentication bypass that requires no guessing, no credential leakage, and only a single TCP connection. By passing an oversized password string to a vulnerable musl-based OpenSSH server, the system misinterprets an internal library error as a successful password match, granting immediate shell access.

Why are glibc-based distributions like Ubuntu and RHEL immune to this vulnerability?

GNU C Library (glibc) implementations do not return a single asterisk (*) string when processing passwords longer than 256 bytes during SHA-256 or SHA-512 hashing operations. Because the specific string collision between musl’s error return value (*) and the shadow file account disable marker (*) does not occur under glibc, glibc-based distributions are inherently immune.

Does updating the OpenSSH package on Alpine Linux immediately secure the server?

No. Upgrading the package via apk upgrade openssh replaces the binary files stored on the disk, but the running sshd daemon process remains active in system memory executing the unpatched code. The server remains fully vulnerable to remote exploitation until the sshd service is explicitly restarted using rc-service sshd restart or system reboot.

Can key-only SSH users be targeted if password authentication remains enabled on the server?

Yes. If an account was created for SSH key access only and its password field in /etc/shadow was set to * to disable password logins, it becomes a direct target for this vulnerability if PasswordAuthentication yes remains enabled in sshd_config. The vulnerability explicitly allows attackers to bypass key checks and authenticate to those accounts using oversized password strings.

What immediate workaround exists if upgrading OpenSSH to version 10.6p2 is not feasible?

The most effective immediate workaround is to set PasswordAuthentication no and KbdInteractiveAuthentication no in /etc/ssh/sshd_config, then reload the SSH daemon service. Disabling password authentication globally bypasses the vulnerable crypt() code branch inside OpenSSH, protecting unpatched musl systems from exploitation.

Sources and further reading

This article was drafted with AI assistance from the publicly cited sources and passed automated checks for structure and sourcing. Verify critical details against the vendor advisories linked above before acting.