Skip to content
Access control Write-up Advanced

*sshole (CVE-2026-123158): How a one-character password hash gives you root

On musl-based Linux systems without PAM, OpenSSH's password authentication could be bypassed for accounts with a locked password hash of '*'. An attacker could log in as such an account by sending two overlong passwords in a single TCP connection, provided another account on the system had a real SHA-512 password hash.

Matt Vogt Follow

Published on osec.com

The OpenSSH authentication bypass on Alpine and musl Linux, explained from the source

Matt Vogt, on osec.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the combination of OpenSSH's salt selection logic for locked accounts, musl's crypt() returning '*' on failure, and the lack of a minimum hash length check allowed a '*' stored hash to match the crypt() output.

Impact

An attacker could bypass password authentication and log in as any account with a locked password hash ('*'), potentially gaining root if such an account can escalate privileges.

What the attacker needed

Musl libc, no PAM; PasswordAuthentication yes; account with '*' password hash; another account with $5$ or $6$ hash

The fix

The vulnerability was fixed in OpenSSH 10.6p2 by adding a minimum hash length check in sys_auth_passwd, which rejects stored hashes shorter than 4 bytes.

How it was found

  1. Set up a musl-based system (e.g., Alpine) with OpenSSH built without PAM, password authentication enabled, and at least one account with a locked password ('*') and another with a real SHA-512 hash.
  2. Connect to the SSH service and initiate password authentication for the locked account.
  3. Send an overlong password (over 256 bytes) as the first attempt; this primes the salt cache.
  4. Send the same overlong password again in the same TCP connection; the authentication succeeds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a flaw in how OpenSSH checks passwords on certain Linux systems (those using musl instead of the more common glibc). Normally, an account with a locked password (shown as '*' in the password file) cannot be logged into with a password. But due to a quirk in how musl's password hashing function handles very long passwords, OpenSSH mistakenly thinks the password matches, allowing login. The attacker needs to send two long passwords in the same connection, and the system must have at least one other account with a real password hash.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.