Patch Ticker

OpenSSH sshd password authentication bypass on musl Linux (SSHole)

Alpine·OpenWrt Linux remote login servers let anyone in with a long password!

Summary

The password check in the OpenSSH server (sshd) is bypassed on musl libc Linux systems such as Alpine and OpenWrt when PAM is not used. For some account setups, any password between 256 and 1024 characters succeeds, and public exploit code exists and attacks have been observed.

Affected when

  • musl libc-based Linux (Alpine, OpenWrt, Buildroot, Yocto)
  • sshd without PAM
  • password logins turned on
  • accounts whose password field is * (key-only accounts, LDAP accounts, etc.)

What to do

Update to OpenSSH 10.6p2 or later. Until then, set PasswordAuthentication to no in the configuration and restart sshd.

On Alpine Linux, run this to update:

apk upgrade openssh

Can't update yet?

Add this line to /etc/ssh/sshd_config.d/00-no-passwords.conf:

PasswordAuthentication no

A wrong setting can stop the service or lock you out. Check the source links below first.

Then restart sshd.

Products and platforms

  • Linux
  • OpenSSH

CVE IDs

Sources

Times

First published

First seen