
Python PoC exploit for CVE-2026-123158 ("sshole"), an OpenSSH authentication bypass on Alpine Linux without PAM, triggered by long passwords against musl crypt().
CVE-2026-123158 is an SSH authentication bypass vulnerability (SSH authentication bypass, login without a password) that affects OpenSSH compiled without PAM on Alpine Linux (musl libc). This repository contains the exploit / PoC (Proof of Concept) in Python that reproduces the flaw in a practical way.
Nicknamed "sshole", the vulnerability allows logging in via SSH to accounts without a real password without needing to know any credentials.
Keywords: CVE-2026-123158, sshole, OpenSSH exploit, Alpine Linux vulnerability, musl crypt bypass, SSH authentication bypass, SSH login without password, auth bypass PoC.
The crypt() function of musl libc (the libc used by Alpine Linux) literally returns the * character when the submitted password exceeds 256 bytes and the hash stored in /etc/shadow is also * (account marked as "no valid password", typical of service or disabled accounts). OpenSSH, when compiled without PAM support, compares that result directly against the shadow field: when comparing "*" == "*" the server accepts the login without the attacker knowing any real password.
Impact: SSH authentication bypass / access without credentials on affected accounts.
Conditions required for the system to be vulnerable:
openssh-server compiled without PAM (--without-pam), as happens by default in many Alpine Linux images.PasswordAuthentication yes in sshd_config.* in /etc/shadow (user without a real password assigned).$5$ or $6$ hash (necessary for musl to enter the vulnerable code path).pip install paramiko
python3 exploit.py <HOST> <PORT> <USER> [LEN]
# Ejemplo contra cuenta 'alice' con contraseña de 300 caracteres
python3 exploit.py 172.17.0.2 22 alice 300
The script first sends a short password (negative control) and then a long password (>256 bytes) to trigger the musl crypt() bug and confirm whether the login is accepted without valid credentials.

# Actualizar y reiniciar sshd
apk upgrade -U -a
rc-service sshd restart
# O deshabilitar autenticación por contraseña
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
rc-service sshd restart
Available at DockerLabs / BunkerLabs — Eseeseache machine — image eseseache:latest, freely accessible, to practice exploiting CVE-2026-123158 in a controlled environment.
For educational purposes. Do not use against systems without express authorization.