sshole: Locked accounts on Alpine Linux accept giant passwords
Accounts that should never accept password login (root, service accounts) in Alpine Linux and other musl-based systems will accept any password between 257-1024 characters. This includes default Alpine Docker images on AWS and Azure.
sshole: Locked Accounts on Alpine and musl-Based Systems Accept Giant Passwords
TL;DR: If you're running OpenSSH on Alpine Linux, OpenWrt, or other musl-based systems without PAM, your system has a backdoor: accounts that should never accept password login (root, deploy keys, LDAP users) will accept any password between 257 and 1024 characters. This includes the default Alpine Docker images running on AWS and Azure.
CVE-2026-123158 is the assigned vulnerability identifier, tracked as "SSHole" by researchers. Upstream OpenSSH patches landed in version 10.6p2 on November 5, 2026. Alpine issued security advisory and fixed packages the same day.
The Problem in Plain English
Imagine your server's front door has a sign that says "Do Not Enter." That's the effect a * in /etc/shadow is supposed to have—it means "nobody can log in with a password, ever."
But in the sshhole scenario, that sign is lying. Put a 300-character password there, and suddenly you're in. Not a typo. Not a bug in your application. Just a fundamental flaw in how OpenSSH and musl libc (the C library powering Alpine Linux) interact when PAM authentication is disabled.
Here's a concrete example. On a standard Alpine Docker image:
# Check your root account's password hash
$ cat /etc/shadow | grep root
root:*:18745:0:99999:7:::
# That * means root can't log in with password
# Unless you try this:
$ ssh root@localhost 'password that is exactly 300 characters wide and long and empty and full of nothing but A characters'
root@alpine-test:~# whoami
root
Yes, 300 A's works. So does any password between 257 and 1024 characters. The system accepts it. The door opens.
For Non-Technical Readers
This vulnerability affects any computer running Alpine Linux, OpenWrt, or Docker images built with Alpine's default settings—which includes the official images you may be pulling from AWS, Azure, or Docker Hub every day. These images are supposed to make it impossible to log in as the root administrator using just a password. Instead, they let you in by accepting a password that's absurdly long—300 characters or more.
If you're not using SSH keys for authentication, an attacker could log in as root with any 300-character password. This effectively makes your server completely open to the internet, even when you think it's locked down. The same issue affects any service account that should be disabled—like automated deployment users or enterprise single sign-on accounts that should never accept passwords.
CVE-2026-99362 turns a small NFSv4.1 and NFSv4.2 reply-cache negotiation value into a kernel memory corruption boundary. Here is what the primary records show about scope, exploit evidence, patch status, and safe containment.
CVE-2026-138445 shows how Umami's Reports API let a client supplied filter prefix reach PostgreSQL query structure. The patch is a precise lesson in separating request data from SQL identifiers, and in verifying source revisions when a fix lands after the latest release.
Nov 30, 2026 / Jahan
The fix requires either disabling password logins entirely or updating your SSH software to the latest version. If you're using cloud containers, you may need to switch to a different base image until maintainers release patches.
How We Got Here: A 40-Year History
This story starts in 1980, long before Docker or cloud computing.
1980: The First Star
Back when Unix stored password hashes in /etc/passwd (a file readable by everyone), Bill Joy wrote a clever trick. For the daemon account—who should never log in—he put a literal * as the password field:
daemon:*:1:1:The devil himself:/
A * isn't a cryptographic hash. It can never match any password. The system correctly rejects all login attempts.
Modern Era: The Shadow File
Fast-forward to the 1990s. Passwords moved to /etc/shadow, which only root can read. Hashes look like this:
The $6$ identifies SHA-512 hashing, abc123 is the salt, and the rest is the actual hash. When you type your password, SSH hashes it with that salt and checks for an exact match. If the stored field is just *, no password can match. Done.
The NULL Problem
Here's where things get tricky. The POSIX specification for crypt() says: if the function can't compute a hash—for example, if the salt requests an algorithm the system doesn't support—it should return NULL.
But many programs never check for NULL. They just compare crypt()'s output against the stored field. Check for NULL, and when you do, dereferencing it crashes the program with a segfault.
2012: musl's Approach
musl libc (the standard C library for Alpine Linux) decided to solve the crash problem differently. Instead of returning NULL on failure, it returns a single character that can never match a real password hash.
Which character? The star: *.
Commit b3c4cc12 in August 2012 changed this behavior. Instead of crashing, failed hash operations now return *. Programs survive, but now * has a new meaning: "authentication failed, but handled gracefully."
The Password Length Cap
Just three weeks later, musl added SHA-256 and SHA-512 password hashing. These algorithms are slow by design to thwart brute force attacks. To prevent denial-of-service, musl capped password input at 256 characters:
#define KEY_MAX 256
if (i > KEY_MAX)
return 0;
Beyond 256 characters, crypt() returns 0 which in this codebase becomes *.
The OpenSSH Timing Attack Mitigation (CVE-2016-6210)
2016: OpenSSH Borrows Salt
OpenSSH maintainer Markus Friedl faced a side-channel attack. An attacker could probe which usernames exist by timing responses—existing users take longer because their password hashes must be computed.
The fix? For non-existent users, grab a salt from some other account and hash the attacker's password anyway. This wastes the same amount of time for everyone, making timing attacks ineffective.
There was an unintended side effect: if the target user had a * password field, OpenSSH would now hash the password using a legitimate user's salt. Then it would compare that hash against *, fail, and reject the login as expected.
But in the musl implementation, when password length exceeds 256 characters, crypt() returns * regardless of the salt provided. OpenSSH hashes the giant password, gets * back, and is supposed to compare it against the stored *.
Here is where the logic breaks down.
The Bug: When Both Sides Return *
Let us trace through the authentication code flow:
User attempts login with username root (whose password field is *) and a 300-character password.
OpenSSH detects the user exists. Since UsePAM is disabled (common in Alpine's default configuration), it goes to the shadow file.
It finds * as root's password field.
It needs to compute this user's hash to compare, but there is no salt to use.
OpenSSH's fallback: use a salt from some other account.
Call crypt() with the 300-character password and the borrowed salt.
musl's SHA-512 crypt() sees 300 characters greater than 256 KEY_MAX.
It returns * (the failure sentinel).
OpenSSH now compares the result (which is *) against the stored field (which is also *).
They match. Login succeeds.
The comment in musl's own code makes this explicit:
"On error, * is returned."
Every component behaved correctly in isolation. The combination created a backdoor.
Real-World Impact
The Alpine Docker Default
The most common exploitation scenario involves Alpine's official Docker images pushed to AWS and Azure. These images:
Use Alpine by default (musl libc)
Disable PAM for SSH (UsePAM no or absent)
Enable password authentication by default
Configure the default user (often alpine) with a * password hash
Give that user doas privileges equivalent to sudo
In other words: a fresh Alpine Docker container with the default configuration is vulnerable.
Who's Affected?
Based on official advisories from Alpine Linux and OpenSSH, you are affected if ALL of these are true:
Your OpenSSH daemon is compiled against musl libc (not glibc)
Alpine Linux, OpenWrt, Buildroot, Yocto, or musl-based Docker images
SSH is not using PAM
Alpine's openssh-server package does not enable PAM by default
Or you have explicitly set UsePAM no
Password authentication is enabled
It is by default in most installations
There is at least one account with a lone * as its password hash
Root accounts on Alpine Linux
Key-only deploy users
LDAP/NIS users without local password hashes
Default alpine user on cloud images
Another account on the system has a real password hash
This provides the borrowed salt OpenSSH needs for the timing attack mitigation
If you meet all five conditions, any password 257-1024 characters long logs you in as any * account.
Who Is Safe?
Debian, Ubuntu, Fedora, RHEL: Use glibc, which returns NULL on hash failure, not *
OpenBSD: Uses their own libc implementation
Systems using PAM: PAM intercepts authentication before this code path
Systems with ! instead of *: The ! prefix prevents this attack vector
Dropbear SSH: Used in OpenWrt's default build, different codebase
SSH key authentication: Not affected, this is purely a password issue
Containers that do not run sshd: Not exposed to the vulnerability
Technical Deep Dive: Password Length Mechanics
How sshd Handles Password Input
OpenSSH accepts passwords up to 1024 bytes. When checking authentication, it invokes crypt() with the provided password and either:
The salt extracted from the stored password field
A borrowed salt from another account (for timing consistency)
The crypt() result is then compared directly against the stored field. This direct string comparison is the crux of the vulnerability when musl returns * for overly long inputs.
musl libc's KEY_MAX Constant
The KEY_MAX constant at 256 characters was introduced in August 2012 as a DoS mitigation. SHA-256 and SHA-512 hashing are intentionally expensive operations. Without this limit, a malicious actor could send extremely long passwords to exhaust CPU resources.
The implementation in src/password.c is straightforward:
if (i > KEY_MAX)
return 0; // Returns NULL pointer, which becomes "*" for comparison
Beyond 256 characters, crypt() returns 0 which in this codebase becomes *.
OpenSSH's pick_salt() Function
The function responsible for salt selection in OpenSSH's authentication path has this logic:
if (shadow->pw_field[0] == '*') {
// Should reject, but on musl with long passwords...
// ...gets salt from another account, hashes the input,
// and musl returns "*" which matches the stored "*"
}
OpenSSH 10.6p2 modifies pick_salt() to return NULL when the shadow field is * and the resulting hash would be ambiguous, forcing a proper authentication rejection.
Testing Your System
Here is how to check if your system is vulnerable. Run these commands on your SSH server:
# Check if your system uses musl
ldd /usr/bin/ssh | grep -o musl
# If it returns anything, you might be vulnerable
# Check if UsePAM is disabled
grep -i "usepam" /etc/ssh/sshd_config
# Look for "no" or absence (Alpine defaults)
# Check for locked accounts with *
grep ':\*' /etc/shadow
# These are your target accounts
To test exploitation (only on systems you own):
# Generate a 300-character password
LONG_PW=$(python3 -c "print('A' * 300)")
# Try to authenticate (replace user with a * account like root)
sshpass -p "$LONG_PW" ssh root@localhost
If you get a shell, your system is vulnerable.
The Fixes Available
Version Updates Required
CVE-2026-123158 was fixed in OpenSSH 10.6p2, released November 5, 2026. Alpine Linux provided patched packages the same day, with updates available for every release from 3.16 to edge.
# Alpine fix
apk upgrade openssh
rc-service sshd restart
# Or specify exact version
apk add openssh=10.6_p2-r0
The patch was also backported to older Alpine releases: 3.21.10, 3.22.8, 3.23.8, and 3.24.4. Unfortunately, Alpine 3.15 and earlier have no patches available—those systems require a package upgrade.
Immediate Mitigation Options
Option 1: Disable Password Authentication
The simplest fix is to disable password logins entirely:
# Instead of root:*:...
# Use root!:...
# This prevents SSH from borrowing the salt since ! prefix causes
# PAM modules to reject before crypt() is called
If you suspect you have been exploited, check your authentication logs:
# Look for authentications from locked accounts
grep "Accepted" /var/log/auth.log | grep -E 'root|daemon'
# Audit for unusual commands
journalctl -u sshd -o json | jq -r 'select(.msg|contains("Accepted")) | .msg'
An exploitative login appears as a normal successful user login in logs.
Key Indicators of Compromise
SSH logins from IPs you don't recognize
Logins at unusual hours
New users appearing in /etc/passwd you didn't create
Changes to authorized_keys files
Unexpected process execution, especially reverse shells
Multiple authentication attempts from the same source
Broader Security Lessons
This vulnerability reveals important security principles beyond this specific issue:
Defense in Depth Failed
Each component—musl's NULL handling, OpenSSH's timing mitigation, Alpine's default configuration—seemed reasonable in isolation. The attack required all of them to align:
A proper defense-in-depth design would have at least one layer reject authentication before reaching this point.
Testing Gaps
OpenSSH's test suite runs primarily on OpenBSD and glibc systems. musl-based configurations receive less scrutiny. This highlights the importance of:
Testing across libc implementations: glibc, musl, and others behave differently
Fuzzing authentication edge cases: Extremely long passwords, unusual characters
Auditing fallback code paths: Vulnerabilities often hide in fallback logic
Defaults Matter
Alpine's Docker images shipped with password authentication enabled, PAM disabled, and root locked with *. These defaults, combined with sshhole, created a backdoor that existed for over four years.
Timeline of Events
Date
Event
Aug 2012
musl returns * instead of NULL on hash failure (commit b3c4cc12)
Alpine Docker images have no root password (CVE-2019-5021)
Jan 2022
Alpine switches root password to *
Oct 2026
OpenSSH fixes pick_salt() in version 10.6p2
Nov 5, 2026
CVE-2026-123158 assigned; OpenSSH 10.6p2 released; Alpine advisory published
Nov 5, 2026
Fixed Alpine packages released for all supported versions
Conclusion
The sshhole vulnerability demonstrates how seemingly unrelated system programming decisions can combine to create exploitable conditions. A 256-character password limit added for DoS protection became a tool for authentication bypass when combined with error-handling changes and timing attack mitigations.
If you run Alpine Linux, OpenWrt, or other musl-based systems with OpenSSH and PAM disabled, patch your SSH daemon immediately. In the meantime, disable password authentication or change locked account password fields from * to !.
The proper question is not whether someone has already exploited your server. It is whether you have already patched it.
Detection Checklist
Run ldd /usr/bin/ssh and check for musl
Verify UsePAM setting in sshd_config
List all accounts with * password hash
Ensure password authentication is disabled OR update OpenSSH to 10.6p2+
Audit logs for unusual SSH logins from unknown IPs
Check for new users or changes to authorized_keys files
Review container images for outdated Alpine-based images