Critical OpenSSH Flaw Lets Long Passwords Bypass Auth !
- Home
- Critical OpenSSH Flaw Lets Long Passwords Bypass Auth !
A critical security vulnerability recently discovered in OpenSSH running on Alpine Linux highlights the subtle complexities of system-level authentication. Identified as CVE-2026-123158, this high-severity vulnerability enables unauthorized attackers to bypass password authentication on affected systems by supplying unusually long password strings.
Technical Overview: The Root Cause
The flaw originates from an unexpected edge-case interaction between OpenSSH and musl libc-the lightweight C standard library that powers Alpine Linux instead of GNU glibc.
When a user submits an authentication request with an abnormally long password (typically between 257 and 1,024 bytes), musl’s underlying crypt() routine fails to process the oversized string properly. Rather than throwing an explicit error or safely rejecting the input, crypt() returns a fallback string consisting of a single asterisk (*).
In Unix-like systems, an asterisk in an account’s password hash field signifies a disabled password or key-only access account. Because the generated output (*) matches the stored account hash string (*), OpenSSH interprets the payload as a valid match, effectively logging the attacker into target accounts without a valid password.
Vulnerability Conditions & Impact
A host running Alpine Linux is vulnerable if it fulfills all of the following conditions:
• OpenSSH Execution: Operating openssh-server on Alpine Linux built without Pluggable Authentication Modules (PAM) support.
• Password Auth Enabled: The PasswordAuthentication directive is explicitly or implicitly set to yes inside /etc/ssh/sshd_config.
• Password-Disabled Accounts: Target accounts exist with an asterisk (*) in their shadow entry (e.g., key-only accounts, default Alpine cloud image users, or locked system accounts).
• Valid System Hashes Present: At least one valid account on the system contains an active $5$ (SHA-256) or $6$ (SHA-512) password hash.
Remediation Steps
System administrators should immediately patch vulnerable hosts or deploy temporary mitigations:
1. Apply Security Updates: Update system packages and explicitly restart the SSH daemon to apply the fix:
2. Disable Password Authentication: If upgrading immediately is not feasible, restrict authentication strictly to SSH key pairs by setting PasswordAuthentication no in your SSH configuration.