←Back to Knowledge

A new OpenSSH flaw lets attackers log in to passwordless accounts on some Alpine Linux servers. How to check, read the logs and fix it.

Date
Reading
5 min read
Written by
Nick Li
Tags
#Risk#Engineering

Many small companies in Hong Kong have a Linux server somewhere: a cloud machine running the website, a booking system or an internal tool, set up by a developer or an IT company. Nobody logs in to it day to day; someone connects over SSH when something needs fixing.

On 5 November, OpenSSH, the program behind those SSH logins, released version 10.6p2 to fix a flaw researchers have nicknamed "sshole" (CVE-2026-123158). On some servers, an attacker can log in to an account that has no password at all, such as root, simply by typing a very long password.

The good news: most servers are not affected, and checking takes about five minutes. The ones to look at run Alpine Linux.

What happened

OpenSSH is the program behind almost every SSH login on Linux. Accounts that should never log in with a password are marked with a * in the system's password file. On systems built with the musl C library and without PAM, a password of a few hundred characters (257 to 1,024, according to OX Security) makes the password check return * as an error, and OpenSSH treated that as a match. The login is accepted.

The OpenSSH release notes say the root cause sits outside OpenSSH itself, but the fix was made there because that is where it can be exploited. The flaw was found by Özgün Kültekin of Wakefield. It is rated 8.1 (High), and so far there are no public reports of it being used in attacks.

Who is affected

All of these must be true, according to OX Security:

  • The server uses musl, not glibc. In practice that mostly means Alpine Linux (versions 3.16 onwards), plus some embedded systems built with Buildroot or Yocto.
  • OpenSSH runs without PAM. Alpine's standard openssh-server package is built this way.
  • Password logins are allowed. This is the default.
  • At least one account has no password (*), for example root, a key-only user or the alpine user in Alpine's cloud images.

Servers running Ubuntu, Debian, Red Hat, Rocky, Fedora or Amazon Linux use glibc and are not affected, and neither are Windows servers.

One more case to know about: Alpine's official AWS and Azure images have a default alpine user that can become root without a password. On those machines, getting in means getting full control.

Check your server in five minutes

If an IT company manages the server, ask them directly: "Do any of our servers or images run Alpine Linux with OpenSSH, and have they been updated to the 5 November fix?" That question should get an answer within a day.

If you manage it yourself, log in and run:

cat /etc/os-release            # Alpine?
ldd --version 2>&1 | head -1   # "musl libc" = musl
apk info -v openssh-server     # installed, and which version?
sshd -T | grep -i passwordauthentication

If the first two lines don't say Alpine or musl, you can stop here: this flaw doesn't apply. If they do, and passwordauthentication yes is shown, check which accounts have no password:

awk -F: '$2=="*" {print $1}' /etc/shadow

If that lists any accounts, the server can be exposed until it is updated.

Containers: most Docker containers built on Alpine don't run an SSH server at all, so they aren't reachable this way. Check any container or image that does install openssh-server.

Has anyone already got in?

Look for successful password logins to accounts that have no password:

grep "Accepted password for" /var/log/messages

A line such as Accepted password for root or Accepted password for alpine on a server where those accounts have no password should not exist. Also check for SSH keys you don't recognise in ~/.ssh/authorized_keys and /root/.ssh/authorized_keys, and for new user accounts.

If you're affected: update and restart

Update the packages and restart SSH. Installing the update isn't enough; the running SSH server must be restarted.

apk upgrade -U -a
rc-service sshd restart

If you can't update straight away, turn off password logins for now. Make sure your own SSH key works first, or you may lock yourself out:

echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-no-passwords.conf
rc-service sshd restart

Then:

  • Rebuild your images too: Docker images and saved cloud templates keep the old version until they are rebuilt.
  • Keep password logins off if everyone already uses SSH keys. That closes this whole class of attack.
  • Limit who can reach port 22, for example only from your office IP or a VPN.

If you find signs of a break-in

  • Don't just patch and move on. Take the server off the internet or block port 22 first.
  • Write down what you found (log lines, times, unknown keys) before changing anything.
  • Rebuild from a clean image if you can, rather than trying to clean the old server.
  • Change secrets stored on that server: database passwords, API keys, SSH keys used from it.
  • Get help from your IT provider or HKCERT. If customer personal data was on the server, consider your duty to inform them and the Privacy Commissioner.

A checklist

  • You know which Linux your servers run (ask your IT provider if not)
  • Alpine servers are updated and SSH has been restarted
  • No unexpected "Accepted password" lines for passwordless accounts
  • Password logins are off where everyone uses SSH keys
  • Port 22 is open only to the people who need it

This is one more fix where attacks tend to follow within weeks, a trend we wrote about in AI is turning security patching into a race against time.

OpenSSH, not OpenSSL

The names are easy to mix up. OpenSSH is the remote login program; OpenSSL is the encryption library behind most HTTPS websites. This week's issue is in OpenSSH. OpenSSL's latest security fixes came out on 29 September, all rated Low; keeping your packages updated covers those too.

A key-only account is only key-only if the server agrees. Check it, and turn password logins off where you can.

If you're not sure what your servers run, or you'd like someone to check them, let's talk.

Further reading