Skip to content
Access control Write-up Intermediate

Cve 2026 123158 The Openssh Password Bypass On Alpine Linux And Other Musl Systems

A logic error in OpenSSH's password authentication on musl-based systems causes sshd to treat the error value returned by crypt() for an overlong password as a valid hash, allowing login to accounts with no password set. An attacker who knows a suitable account name can bypass authentication by sending a very long password.

Maciej Follow

Published on systemweakness.com

On November 5, 2026, the OpenSSH project shipped an urgent release for a password authentication bypass, now tracked as CVE-2026–123158 and nicknamed sshole. On an affected host, an attacker can log in to an account with no password set by sending a very long password, and the content of that password doesn’t matter.

Maciej, on systemweakness.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 a logic error where sshd compares the error return value from musl's crypt() with the placeholder stored for passwordless accounts, treating two identical error markers as a successful match.

Impact

An attacker could log in without a password to accounts that have no password set, potentially gaining a shell and escalating privileges, though only on systems meeting all four conditions and with no attacks in the wild reported at the time of writing.

What the attacker needed

Musl libc; sshd without PAM; PasswordAuthentication yes; target account has * in shadow

The fix

OpenSSH fixed it by requiring a stored value to be at least four characters long before counting a match, and administrators should update and restart sshd or disable password authentication as a stopgap.

How it was found

  1. Identify an account whose password field contains `*` and at least one local account with a `$5$` or `$6$` hash.
  2. Send a password between 257 and 1,024 bytes long for the target account.
  3. sshd hashes the attempt using a borrowed salt from another account.
  4. musl's crypt() rejects the long key and returns `*`.
  5. sshd compares `*` with the stored `*` and accepts the login.

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.

When you log in with a password, the server scrambles it and compares the result with a stored value. On some systems, if the password is too long, the scrambling function gives up and returns a special error marker instead of a real result. The server then compared that error marker with the stored marker for an account that has no password, saw they matched, and let the person in without checking anything.

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.