← CYBERSPACE / Pwning

SSHole (CVE-2026-123158): A Decade-Old OpenSSH Bug Turns Oversized Passwords Into Logins

hacking

OpenSSH sshd before 10.6p2 turns a failed password hash into a valid login on musl Linux without PAM - CVE-2026-123158 (CVSS 8.1), codename SSHole. Any password of ~256-1,024 chars logs into password-disabled accounts; Alpine's cloud images ship a default 'alpine' account with passwordless doas rights. The first exploit attempt came under nine hours after disclosure and reached root on an Alpine honeypot. Patch to 10.6p2, restart sshd, or disable password auth.

OpenSSH's sshd silently turned a failed password check into a successful login on musl-based Linux — and attackers were testing it within nine hours of the public disclosure.

The bug is tracked as CVE-2026-123158 (CVSS 8.1), codenamed SSHole, and it is an authentication bypass, not a memory-corruption exploit. It affects sshd in OpenSSH before 10.6p2 when it runs on Linux with the musl C library and PAM disabled — which is exactly Alpine Linux's default openssh-server configuration. OpenWrt, Buildroot and Yocto images built the same way are in scope too.

What actually goes wrong

The flaw is a return-value misinterpretation, catalogued as CWE-394 (unexpected status code or return value). When sshd is built without PAM it verifies a password by hashing the attempt with libc's crypt() and comparing the result against the account's stored password field. Under certain conditions the hashing itself fails — and instead of rejecting the attempt, sshd produces the same value (*) it uses to mark an account whose password is disabled at the system level. The daemon then compares * to the * stored in the account's password field and declares the login a success.

The trigger is size. Supplying an oversized password — roughly 256 to 1,024 characters — makes the hash operation fail, and on an account whose password hash is exactly *, that arbitrary string becomes a working credential. No key theft, no credential stuffing, no prior access required.

Two scoping points matter for triage:

  • It does not bypass passwords on accounts with a valid password hash.
  • It only reaches accounts deliberately configured without a usable password — the ones marked * or ! in /etc/shadow.

That second point sounds reassuring until you look at what those accounts are. Alpine's official AWS and Azure cloud images ship a default alpine account that is password-disabled and holds passwordless doas privileges — so a bypass on that account is a straight route to root.

The root cause is ten years old

The behaviour traces back to a patch added in 2016 to fix CVE-2016-6210, a username-enumeration issue. The fix tightened password handling on the glibc/PAM path but left the musl-without-PAM path carrying the defect, where it sat unnoticed for a decade.

Researcher Ozgun Kultekin, who found and disclosed the issue, said he arrived at it with the help of AI agents that ran roughly 17,600 authentication tests across different OpenSSH configurations, malformed password hashes and oversized password inputs. That is an interesting data point in its own right: the throughput that makes fuzzing-adjacent research like this tractable is now cheap.

Exploited in under nine hours

Threat-intelligence firm Previdian observed the first exploitation attempt less than nine hours after the CVE was published on 5 November 2026. It confirmed successful root access on a honeypot running Alpine Linux and OpenSSH. Telemetry shows eight exploitation attempts from a single IP geolocated to Japan — 89.116.89[.]18 — which used oversized passwords to bypass authentication and then ran reconnaissance through non-interactive SSH sessions: id, uname and hostname. That is textbook post-access enumeration, not a proof-of-concept.

Not affected: glibc-based distributions (Debian, Ubuntu, Fedora), Dropbear, non-Linux systems, and any sshd that checks passwords through PAM.

What to do

  • Patch. Upgrade OpenSSH to 10.6p2, or apply your distribution's backported package. On Alpine: apk update && apk upgrade openssh. Alpine shipped fixed packages back to release 3.16. Note that Alpine's fixed packages keep older version numbers, so a scanner that only compares against 10.6p2 will misreport patched hosts as vulnerable.
  • Restart sshd. Upgrading the package does not restart the daemon — run rc-service sshd restart. The old code stays resident until it does.
  • Or switch password auth off. Setting PasswordAuthentication no and restarting sshd closes the path immediately.
  • Hunt for compromise. Alpine's guidance: look in /var/log/messages for Accepted password for lines naming an account that should not accept password logins (alpine, root, or any key-only user). Review doas use and recently created users, files and authorized_keys. If you cannot rule out a login, treat the machine as compromised.

Sources

View source ↗