Skip to content
← All posts
3 min read

SSHHole: When a failed password check let you in

A password on one Alpine account could expose a different account that was supposed to accept only SSH keys.

Say you set up an Alpine server with a deploy account that signs in with an SSH key. You leave its password unset. Months later, you set a password on a different account so someone can use the console. On a vulnerable server, that change can let someone sign in as deploy without its key or a valid password.

That's SSHHole (CVE-2026-123158), reported by Özgün Kültekin. OpenSSH shipped a fix on November 5, 2026. Four days later, CISA added the bug to its Known Exploited Vulnerabilities catalog. Kültekin's writeup, OpenSSH release notes, CVE record, CISA's entry in the CVE record.

The same * meant two things

On the affected systems, the SSH server uses a function called crypt() to hash the password you enter. To repeat the original calculation, it needs the salt from the stored hash. Then it compares the result with the stored value.

The deploy account has no hash or salt. Its password field contains *, which means no password is set. OpenSSH can borrow the salt and hash settings from another account and do the work anyway. That behavior came from a defense against guessing which usernames exist by timing login attempts. OpenSSH's timing fix.

Here's where the console password comes in. If its hash supplies the settings for SHA-256 or SHA-512, musl's crypt() rejects passwords longer than 256 bytes. It returns * to signal the error. The old OpenSSH check sees two equal strings. Alpine's technical explanation.

Result from crypt():       *   (hashing failed)
Stored field for deploy:   *   (no password set)
Old password check:       match

Both choices had a reason. OpenSSH wanted failed logins to take similar amounts of time. Musl returned a string because some callers could crash if they got a null pointer. The collision happened because the string musl used for failure was already in the account database. The OpenSSH patch requires at least four characters in the stored field for this comparison to succeed. A single * no longer qualifies. Musl's original change, OpenSSH patch.

What to check on an Alpine server

The bypass requires unpatched OpenSSH on Linux with musl, PAM disabled, and password authentication enabled. The target account needs a * password field, and another account needs a usable $5$ or $6$ hash. An Alpine container that doesn't run sshd has no SSH server for this bug to reach. Alpine's advisory.

If you run sshd on Alpine, install the fixed package for your release branch and restart sshd. A package upgrade alone leaves the old daemon running. Alpine backported the fix, so a fixed package can have a version lower than upstream's 10.6p2. If you can't patch yet, set PasswordAuthentication no and restart sshd. Confirm that key access works first. Keep your current session open while you test a new login. Alpine's package and mitigation instructions.

If a server was exposed, look for "Accepted password for" in its SSH logs. A password login for an account that had no password at the time warrants investigation, even after patching. Alpine's log review guidance.

The test I'd add

A test that sends a wrong password can pass without ever making the hashing function fail. If you maintain an authentication service, test that failure with the same library and settings you ship. Give one account a password, leave another without one, and trigger a hashing error during a login to the second account. Check that the login fails even when the error value matches what's stored.

SecurityOpenSSHAlpine LinuxSSHHoleOpenSSHAlpineLinuxCVE2026123158MuslLibcLinuxSSHAppSecVulnerabilityManagementSoftwareEngineering

Ready to know?

Send what you want checked or built. Fixed scope, price, and date in writing inside 24 hours, or the website or audit fee on your first project is refunded in full.

24 clock hours. Weekends included.
Book a call