CVE-2026-123158 (*sshole): How a 257-Byte Password Opens Root Access on Alpine Linux
CVE-2026-123158 (*sshole) is a high-severity authentication bypass in OpenSSH affecting musl-based Linux systems. A password longer than 256 bytes triggers a musl crypt() error that collides with the shadow sentinel value, granting unauthenticated root access.
CVE-2026-123158 (*sshole): How a 257-Byte Password Opens Root Access on Alpine Linux
CVE: CVE-2026-123158 (GHSA-4fcc-vm97-gx3x)
Severity: CVSS v3.1 — 8.1 High
CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published: 2026-11-05
Fixed in: OpenSSH 10.6p2 (commit 4353fdc43)
TL;DR
OpenSSH running on musl-based Linux distributions (Alpine, OpenWrt, Buildroot, Yocto) without PAM accepts any password between 257 and 1,024 bytes as a valid login for accounts whose /etc/shadow password field is set to *. This means root, key-only users, and LDAP-synced accounts can be accessed without knowing any credential.
The vulnerability has existed since 2016 but was discovered using AI-driven fuzzing. Exploitation attempts were observed less than nine hours after disclosure. A proof-of-concept is publicly available on GitHub.
What Is *sshole?
*sshole (pronounced "ess-ssh-hole") is a password authentication bypass in sshd — the OpenSSH server daemon — that affects systems using the musl C library instead of glibc, when PAM (Pluggable Authentication Modules) is disabled.
The bug allows an unauthenticated attacker to log in as any account whose shadow password field contains exactly * — a value conventionally used to mean "this account has no password and cannot be accessed via password login."
This includes:
- root on Alpine Linux (which ships with
root:*in/etc/shadow) - Key-only users created without a password (
adduser --disabled-password) - The
alpineuser on official Alpine cloud images (AWS, Azure, GCP) - LDAP/Active Directory-synced users fetched via
musl-nscd
On default Alpine configurations, gaining access to the alpine user provides passwordless doas privileges — meaning a single oversized password grants full root access.
How It Works: The Anatomy of a One-Byte Collision
The vulnerability is not a bug in any single component. It is a collision between three independent design decisions made across musl and OpenSSH between 2012 and 2016.
Step 1 — musl's crypt() Returns * on Failure (2012)
Since August 2012, musl's crypt() function returns the literal string "*" when password hashing fails — instead of NULL as POSIX requires. This was a deliberate design choice by musl developers.
musl also caps password input to 256 bytes for its SHA-256 and SHA-512 implementations (KEY_MAX). A password longer than 256 bytes causes the hash operation to fail, which returns "*".
Step 2 — OpenSSH Borrows a Salt for Locked Accounts (2016)
CVE-2016-6210 was a username enumeration vulnerability where sshd responded faster for valid usernames than invalid ones. The fix added a timing mitigation: when checking passwords for accounts without a usable hash (like those with * in /etc/shadow), sshd would borrow the salt from another account on the system that does have a real password hash.
This meant sshd would call crypt() with the submitted password and the borrowed salt — even for locked accounts — to maintain consistent timing.
Step 3 — The Collision
Here is where it all comes together:
- An attacker sends a password of 257–1,024 bytes to an account whose shadow field is
* sshdborrows the salt from another account with a$5$or$6$hash- musl's
crypt()receives the long password + borrowed salt - The password exceeds 256 bytes → hashing fails → returns
"*" sshdcomparesstrcmp("*", "*")— the returned value against the stored field- They match → authentication succeeds
pw_password = "*" # alice has no password
salt = NULL # "*" is too short to be a salt
salt = pick_salt() # sshd borrows bob's: "$6$abc$"
hash = crypt("AAAA…x300", "$6$abc$") # musl: key > 256 bytes -> returns "*"
strcmp(hash, pw_password) == 0 # "*" == "*" → LOGIN ACCEPTED
Neither piece is wrong in isolation. musl's return value is correct per its API. OpenSSH's salt-borrowing was a legitimate security fix. But together they create an authentication bypass.
Affected Systems
A system is vulnerable only if all five conditions hold:
| # | Condition | Detail |
|---|---|---|
| 1 | musl libc | Alpine, OpenWrt, Buildroot, Yocto (with TCLIBC=musl), postmarketos, void-musl, chimera |
| 2 | No PAM | sshd built without PAM or configured with UsePAM no. Alpine's default openssh-server package. openssh-server-pam with UsePAM yes is safe. |
| 3 | PasswordAuthentication yes | This is the OpenSSH default. |
| 4 | Account with * |
root, key-only users, directory-synced accounts, or the alpine user on cloud images |
| 5 | A real $5$/$6$ hash exists |
At least one other local account must have a SHA-256 or SHA-512 password hash (someone ran passwd) |
Not Affected
- glibc systems: Debian, Ubuntu, Fedora, RHEL, CentOS — glibc's
crypt()returnsNULLon failure, never"*". - libxcrypt systems: Returns
"*0"or"*1", not a bare"*". - PAM-enabled systems: sshd bypasses the non-PAM password path entirely when
UsePAM yes. - OpenBSD, FreeBSD, macOS: Different code paths and libc implementations.
CVSS Assessment
| Metric | Value |
|---|---|
| CVSS v3.1 | 8.1 High — AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Attack Vector | Network (remote) |
| Attack Complexity | High (requires specific account/hash layout on target) |
| Privileges Required | None |
| User Interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity | High |
| Availability | High |
No CVSS v4.0 score has been published by MITRE, NVD, GitHub, or Red Hat as of the date of this article.
Exploitation Status
Public PoC: Yes — available at github.com/oz9un/sshole with a Docker-based reproduction environment and an automated attack script.
In-the-wild exploitation: Threat intelligence firm Previdian reported observing the first exploitation attempt less than nine hours after CVE publication. Eight attempts were logged from a single IP address geolocated to Japan (89.116.89.18). The attacker successfully gained root on a honeypot running real Alpine Linux and OpenSSH, running reconnaissance commands (id, uname, hostname) through non-interactive sessions.
CISA has not yet added this vulnerability to its Known Exploited Vulnerabilities (KEV) catalog.
Detection: How to Check If You're Affected
Run the official check script:
curl -sO https://raw.githubusercontent.com/oz9un/sshole/main/check.sh
sudo sh check.sh
The script reports whether all five exploit conditions are met and lists which accounts are exposed.
Manual Detection
Check these on any suspected host:
# Verify musl libc
ldd /usr/sbin/sshd | grep musl
# Check PAM status
sshd -T | grep usepam
# "usepam no" or "usepam (unspecified)" = potentially affected
# Check PasswordAuthentication
grep PasswordAuthentication /etc/ssh/sshd_config
# "yes" = vulnerable if other conditions met
# List accounts with * password field
awk -F: '($2 == "*" || $2 == "!") {print $1}' /etc/shadow
# Check for any SHA-crypt hashes on the system
grep -E '^\w+:\$5\$|^\w+:\$6\$' /etc/shadow
Log-Based Detection
Search authentication logs for entries that should not exist:
grep "Accepted password for" /var/log/auth.log | grep -E "root|alpine|deploy|key-only"
Any such entry on an account configured with * as its password field indicates a successful bypass.
Remediation
Immediate Fix: Upgrade and Restart
OpenSSH upstream:
# Compile from source or use your distribution's package
# OpenSSH 10.6p2 (commit 4353fdc43)
Alpine Linux (all branches):
apk upgrade openssh
# Then restart the daemon — upgrading does not replace the running process
rc-service sshd restart
| Alpine Branch | Fixed Package Version |
|---|---|
| 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 |
Point releases: 3.21.10, 3.22.8, 3.23.8, and 3.24.4 carry the fix. Even EOL branches (3.16–3.20) received backports.
Critical: Upgrading the package does not restart the running sshd daemon. You must restart it manually. Verify with:
readlink /proc/$(pgrep sshd)/exe
# Should NOT show "(deleted)" — that means the old binary is still running
Workaround (If You Cannot Patch Immediately)
Set PasswordAuthentication no in /etc/ssh/sshd_config:
PasswordAuthentication no
Then restart sshd. This completely closes the vulnerability at the cost of disabling password-based SSH login — which is recommended practice for any production system anyway.
Warning: Check for Match blocks in sshd_config that might re-enable password authentication for specific users or groups.
Additional Hardening
- Restrict SSH access to known IP ranges (office, corporate VPN) using
AllowUsers,AllowGroups, or firewall rules - Use key-based authentication exclusively — disable password logins permanently
- Monitor
/var/log/auth.logfor "Accepted password for" entries on accounts that should only accept keys - Review
authorized_keysfiles anddoas/sudoconfigurations for unexpected access
Impact Analysis
Direct Impact
An attacker who successfully exploits this vulnerability gains:
- Full shell access to the targeted account
- No credentials required — no password, no SSH key, no brute-forcing
- One connection is sufficient — it works every time, no retries needed
- Potential root escalation on Alpine cloud images where the
alpineuser has passwordlessdoas
Attack Chain on Cloud Images
On default Alpine AWS/Azure/GCP cloud images:
- Attacker SSHes to the instance with a 257+ byte password
- Logs in as the
alpineuser (which has*in/etc/shadow) - Runs
doasto escalate to root - Full system compromise
The default PermitRootLogin prohibit-password blocks direct root login, but the alpine user's passwordless doas provides an alternative escalation path.
Why This Matters for DevOps and Infrastructure Teams
*sshole is particularly dangerous because:
- Alpine Linux is ubiquitous in containers. The vast majority of Docker images built from
alpineoralpine:latestare affected if they installopenssh-server. CI/CD runners, build agents, and microservices often run on Alpine. - The vulnerability dates to 2016. It has been present for a decade, hidden behind the default configuration of one of the most popular container base images.
- Exploitation requires no reconnaissance. An attacker only needs a guessed username (root, alpine, deploy are all common) and a long password. No fingerprinting or enumeration is required.
- The fix is trivial but often missed. Upgrading OpenSSH does not restart the daemon. Many administrators patch and move on, leaving the vulnerable binary running indefinitely.
- AI-driven discovery means more vulnerabilities like this will emerge. Özgün Kültekin discovered *sshole using AI agents that ran approximately 17,600 authentication tests across different OpenSSH configurations. This suggests that automated vulnerability discovery is becoming a significant threat vector — and that there may be other latent bugs waiting to be found.
Timeline
| Date | Event |
|---|---|
| 2012 | musl's crypt() begins returning "*" on failure; 256-byte key limit introduced |
| 2016 | OpenSSH fixes CVE-2016-6210 (username enumeration) by borrowing salts for locked accounts |
| 2016–2026 | Vulnerability exists unexploited in the wild |
| Nov 2026 | Researcher discovers *sshole using AI-driven fuzzing (~17,600 tests) |
| 2026-11-04 | Vulnerability reported to OpenSSH by Özgün Kültekin of Wakefield |
| 2026-11-05 | OpenSSH releases 10.6p2; Alpine publishes patched packages for all branches |
| 2026-11-05 | CVE-2026-123158 assigned by MITRE; PoC published on GitHub |
| 2026-11-05 (<9hrs) | First exploitation attempts observed from Japan; root access confirmed on honeypot |