CVE-2026-123158: OpenSSH Password Authentication Bypass on Alpine Linux with musl libc
OpenSSH before 10.6p2 running on Alpine Linux or other musl libc systems without PAM lacks a workaround for password hash misinterpretation, allowing any password between 256 and 1024 characters to succeed for certain accounts. This affects SSH access controls on affected systems.
OpenSSH's password validation code on musl libc without PAM mishandles certain password hashes, treating strings between 256 and 1024 characters as valid passwords regardless of the actual hash. Alpine Linux and similar distributions using musl libc are particularly vulnerable. An attacker can gain SSH access to affected accounts by supplying any long password, completely bypassing authentication.
| CVE | CVE-2026-123158 |
|---|---|
| Severity | High (CVSS 8.1) |
| Actively exploited | Yes, listed in CISA's Known Exploited Vulnerabilities catalog on 9 Nov 2026 |
| CISA remediation deadline | 12 Nov 2026 |
| Weakness | CWE-394 |
| Attack vector | Network |
| Privileges required | None |
| User interaction | None |
| Published | 5 Nov 2026 |
How the attack works
sshd uses system calls to validate passwords. On musl libc without PAM, the password hashing function crypt() returns a value that OpenSSH fails to correctly interpret as a failed hash check. When a password string is between 256 and 1024 characters, the crypt() result is misread as a match, allowing authentication to succeed even with an incorrect password. The flaw does not affect all accounts uniformly; it depends on account configuration.
Who is affected
OpenSSH versions before 10.6p2 running on Linux systems with musl libc and no PAM, including Alpine Linux. Other musl-based distributions and minimal container images are at risk.
Affected products listed:
- Openbsd Openssh (before 10.6)
- Openbsd Openssh (version 10.6)
How to check if you're exposed
- Identify all systems running Alpine Linux or musl libc-based distributions; check OpenSSH version for anything before 10.6p2
- Run `ssh -V` or `sshd -v` to confirm version; flag any below 10.6p2
- Check OpenSSH configuration for PAM setting; if PAM is disabled, the system is vulnerable
- Review SSH authentication logs for successful logins using suspiciously long passwords (256+ characters)
How to fix it
- Upgrade OpenSSH to version 10.6p2 or later on all affected systems
- On Alpine Linux, run `apk update && apk upgrade openssh`; on other musl systems, use your distribution's package manager
- Restart sshd after upgrade: `service sshd restart` or `systemctl restart sshd`
- Review SSH access logs and audit user accounts for unauthorized access during the vulnerable window
If you can't patch yet
- Enable PAM in OpenSSH configuration (UsePAM yes) if available on your musl libc variant; this bypasses the vulnerable crypt() code path
- Restrict SSH access to Alpine Linux systems to specific trusted IP addresses using firewall rules or host-based access control lists
- Enforce strong password policies and monitor for logins with unusual password lengths (256+ characters) until patched
Need help checking your exposure or patching at scale? FutureOps InfoTech can help.