
Go tool that detects CVE-2026-123158, an OpenSSH password authentication bypass on musl-based Linux without PAM, and can run a command after a successful bypass.
A tool to detect CVE-2026-123158, a password authentication bypass in OpenSSH on musl-based Linux systems without PAM (notably Alpine Linux).
The tool performs a two-step authentication probe inside a single SSH handshake and reports whether the server accepts an oversized password for an account that has no password set.
Use only against systems you own or have explicit permission to test.
go mod init cve-2026-123158
go get golang.org/x/crypto/ssh
go build -o cve-2026-123158 .
./cve-2026-123158 -host <host:port> -user <username> [-c <command>]
| Flag | Default | Description |
|---|---|---|
-host | (none) | Target SSH host and port. Required. |
-user | root | Account to probe. Must have * in /etc/shadow. |
-timeout | 15s | Connection timeout. |
-c | (empty) | Command to run after a successful bypass (e.g. id). |
# Detect only
./cve-2026-123158 -host 192.168.207.134:22 -user hack
# Detect and run a command
./cve-2026-123158 -host 192.168.207.134:22 -user hack -c id
If the server is patched, the account has a real password, or password auth is
disabled, the tool reports NOT VULNERABLE.
All of the following must be true:
UsePAM no, Alpine's default).PasswordAuthentication yes.* in /etc/shadow.apk upgrade -U -a
rc-service sshd restart
If patching is not possible:
echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf
rc-service sshd restart
MIT