Skip to main content
All incident reports
Incident report

OpenSSH fixes flaw that let oversized passwords log into Alpine Linux accounts

OpenSSH has released version 10.6p2 to fix a flaw in how its server checks passwords on Linux systems built on the musl C library, chiefly Alpine Linux. An attacker with network access and a known account name could log into an account meant to have no password by sending one between 257 and 1,024 bytes long. Researchers have since recorded exploitation in the wild, and the flaw is now tracked as CVE-2026-123158.

· First published · Last updated

The short version

  • The flaw. OpenSSH released version 10.6p2 on 5 November to fix a password-checking flaw in sshd, its SSH server, on Linux systems built on the musl C library. Alpine Linux is among the affected distributions, and no CVE identifier had been assigned.
  • Who can be attacked. An attacker with network access and an account name can log in as an account that has no password, such as a key-only account, by sending a password of 257 to 1,024 bytes. The server must have password logins enabled, must not use PAM, and must have at least one other account with a real password hash.
  • Where it comes from. The behaviour traces to a 2016 OpenSSH change that fixed a username-enumeration flaw, CVE-2016-6210, together with musl's crypt() returning an asterisk for passwords longer than 256 bytes. The stored hash of a passwordless account is also an asterisk, so the two match.
  • Cloud images at risk. Alpine's tiny-cloud images from 3.18.11 to 3.24.3 include an 'alpine' account with passwordless doas, a tool for running commands as another user. Anyone who logs in as that account can become root, according to the advisory.
  • Attacks followed. Previdian recorded attempts within nine hours of the flaw's publication and confirmed root access on a honeypot. GreyNoise logged its first successful exploitation on 7 November at 00:46 UTC, about 40 hours after the fix. The flaw is now tracked as CVE-2026-123158.

Timeline

DateEvent
9 Aug 2012musl changes crypt() so a failed call returns an unmatchable hash instead of NULL, the behaviour underlying the flaw.
15 Jul 2016OpenSSH changes how it hashes passwords for accounts without a usable hash, to fix the username-enumeration flaw CVE-2016-6210.
5 Nov 2026Özgün Kültekin publishes technical details of the flaw.
5 Nov 2026OpenSSH releases 10.6p2 and Alpine publishes fixed packages for its releases back to 3.16, including branches past end of support.
6 Nov 2026Previdian first records exploitation attempts, and watchTowr reports that botnets and cryptominers are using the flaw.
7 Nov 2026GreyNoise records the first successful exploitation in the wild at 00:46 UTC.
8 Nov 2026Previdian's last recorded exploitation attempt against the flaw.

How the flaw works

Without PAM, a pluggable authentication framework, sshd hashes each submitted password with musl's crypt() and compares the result with the field stored in /etc/shadow. An account with no password stores only an asterisk there, which is too short to hold a salt, the random prefix of a hash, so sshd borrows the salt of another account that has a real hash. musl's crypt() rejects passwords longer than 256 bytes and returns an asterisk to signal the error.

That asterisk matches the asterisk stored for the passwordless account, so sshd accepts the login. The upper bound of 1,024 bytes is sshd's own per-password limit. Alpine's advisory says the attack succeeds on every attempt over a single connection.

The salt borrowing arrived in July 2016 with the fix for CVE-2016-6210, which let attackers work out which usernames existed, and the musl behaviour dates from 2012. OpenSSH's change makes sshd refuse a match when the stored field is shorter than four characters; the project says the root cause sits outside sshd.

Who is exposed

Alpine's advisory lists four conditions: the openssh-server package built without PAM, or openssh-server-pam with UsePAM no; PasswordAuthentication set to yes, the OpenSSH default; an account whose password field is an asterisk; and at least one other local account with a $5$ or $6$ hash. The attacker also needs the name of the passwordless account.

On Alpine that includes key-only users created without a password, users supplied by a directory service through musl-nscd, root, which has shipped as root:* since about release 3.16, and the alpine user in tiny-cloud images. PermitRootLogin prohibit-password shields root unless that setting is changed, but an exposed account able to run doas reaches root regardless.

Systems built on glibc, including Debian, Ubuntu and Fedora, are not affected, nor are servers using PAM, servers with PasswordAuthentication no, containers without sshd, accounts locked with ! in /etc/shadow, or hosts where no account has a $-style hash. Kültekin names OpenWrt, Buildroot and Yocto as other musl systems to check; OpenWrt uses Dropbear by default and he says Dropbear is not affected.

Disclosure and the fix

Kültekin, of Wakefield, found the flaw using AI agents that ran about 17,600 authentication tests across OpenSSH configurations, malformed password hashes and oversized passwords, BleepingComputer reports. He published details on 5 November. OpenSSH shipped 10.6p2 the same day, having learned of the flaw earlier that week.

Damien Miller of the OpenSSH project told anyone on an affected system to "set PasswordAuthentication=no or disable SSH for these systems IMMEDIATELY." He said the team now sees long embargoes as dangerous and mainly helpful to attackers, because it has seen AI agents find the same bugs again, sometimes within hours.

Kültekin says the flaw has existed since 2016. The first reports, on 5 November, recorded no attacks using it. Alpine's advisory tells administrators who cannot rule out a login that they should treat the machine as compromised, and points to its own package versions for the fix; self-built installations need 10.6p2.

Update: exploitation in the wild

Previdian recorded attempts within nine hours of the flaw's publication and confirmed root access on a honeypot. GreyNoise logged its first successful exploitation on 7 November at 00:46 UTC, about 40 hours after the fix.

GreyNoise saw reconnaissance, queries to cloud metadata services, attempts to read password hashes and root SSH keys, and attempts to modify SSH authorized_keys files for persistence. One attacker installed a Python command-and-control implant that never reached its server.

What is not known yet

  • Whether anyone exploited the flaw before the fix shipped.
  • Whether a CVE identifier will be assigned and what it will be.
  • How many Alpine, OpenWrt, Buildroot and Yocto systems run the vulnerable combination of settings.
  • Whether other musl-based distributions with an OpenSSH server are affected in practice.
  • Whether any passwordless logins occurred quietly since 2016 without leaving records administrators still hold.

What to do

If you run Alpine Linux or another musl-based system

  1. On Alpine, update packages with apk upgrade -U -a and restart the server with rc-service sshd restart, because upgrading the package does not restart the running sshd.
  2. Update cloud instances started from tiny-cloud images 3.18.11 to 3.24.3, or apply the password setting below.
  3. Check whether the OpenSSH server is installed on OpenWrt, Buildroot or Yocto hosts; OpenWrt's default Dropbear is not affected according to Kültekin, but an admin-installed OpenSSH server is.
  4. See Alpine's advisory for the fixed package releases, including branches past end of support.

If you cannot patch yet

  1. Confirm your key-based login works and keep the current session open until a new login succeeds.
  2. Add PasswordAuthentication no in a drop-in file under /etc/ssh/sshd_config.d and change every PasswordAuthentication yes line in /etc/ssh/sshd_config, including lines inside Match blocks.
  3. Validate with sshd -t, restart sshd, and confirm that sshd -T | grep -i passwordauthentication prints passwordauthentication no.

If you want to check for exploitation

  1. Search /var/log/messages for sshd lines reading Accepted password for an account that should have no password, such as alpine, root or a key-only user.
  2. On Alpine, compare a successful login in the logs with the account's field in /etc/shadow; an asterisk there alongside a logged password login is suspicious.
  3. Review doas use, recently created users, files and authorized_keys on exposed machines.
  4. Treat any machine where you cannot rule out a login as compromised.

Update log

  • Added reports of exploitation: attempts within hours of the fix and a first successful attack on 7 November.
  • First published.

Sources

New incident reports by email

One email a week with the reports published since the last one.

Want us to look at your domain?

Give us one apex domain and we'll send back a written snapshot of what is already visible from outside. No call required.