Blog / Security Advisories

Alpine Linux OpenSSH “sshole” (CVE-2026-123158): Password Bypass, Fixed Packages, and How to Check Your Hosts

On November 5, 2026, OpenSSH and Alpine Linux shipped fixes for an authentication bypass in sshd on musl-based systems. An attacker who can reach port 22 can log in to accounts that have no password, including the default user on Alpine’s cloud images, by sending a password longer than 256 bytes. Attacks started within nine hours. Here are the fixed packages, how to tell if you are exposed, and how to check for compromise.

· 9 min read

CVE-2026-123158, nicknamed sshole (stylized *sshole), is a CVSS 8.1 password authentication bypass in OpenSSH when it is built against the musl C library without PAM. That is exactly how Alpine Linux ships its default openssh-server package. Accounts meant to be key-only, which Alpine marks with a * in /etc/shadow, accept any password between 257 and 1,024 bytes long. Every Alpine release from 3.16 through 3.24 and edge is affected, as are musl-based OpenWrt, Buildroot, and Yocto builds.

This article was created with AI assistance. Facts were checked against the researcher and vendor write-ups and Alpine’s published fixed package versions on November 7, 2026. Confirm details in the official Alpine and OpenSSH advisories before acting.

TL;DR: what to install

Upgrade with apk upgrade -U -a, then restart sshd. A running sshd keeps the vulnerable code in memory until it restarts.

Alpine branchFixed openssh package
edge10.6_p2-r0
3.2410.3_p1-r2
3.2310.2_p1-r1
3.2210.0_p1-r11
3.219.9_p2-r1
3.209.7_p1-r6
3.199.6_p1-r3
3.189.3_p2-r4
3.179.1_p1-r7
3.169.0_p1-r6
Other musl systems building OpenSSH from sourceOpenSSH 10.6p2 or a backported patch

Alpine backported the fix all the way to 3.16, which includes branches that are otherwise past their support window. If you cannot patch today, set PasswordAuthentication no (see mitigations), which fully closes this attack path for hosts that only use SSH keys.

Timeline

DateEvent
2016OpenSSH changes how it checks passwords for nonexistent and locked users, to fix the username enumeration bug CVE-2016-6210
2022Alpine starts using * in the password field for accounts that should only log in with keys
November 5, 2026Researcher Özgün Kültekin discloses the bug. OpenSSH 10.6p2 and fixed Alpine packages are released
Less than 9 hours laterThreat intelligence firm Previdian records the first exploitation attempts against its honeypots
November 6, 2026Not yet listed in CISA’s Known Exploited Vulnerabilities catalog

The first attempts came from a single source and were few in number, but exploitation is trivial: no credentials, no memory corruption, just a long string. Expect broad scanning to follow.

What went wrong: an error value that looked like a match

Three reasonable decisions, made years apart by three projects, combined into a bypass:

  1. musl’s crypt() rejects long passwords. When the input is longer than 256 bytes, musl does not hash it. It returns the string * to signal failure.
  2. Alpine marks key-only accounts with *. The stored “hash” for those accounts in /etc/shadow is literally *, meaning “no password will ever match.”
  3. sshd compares strings. Without PAM, sshd hashes the submitted password with crypt() and compares the result with the stored value. Since the 2016 enumeration fix, it does this for every account in the same way.

Send a 300-byte password for a key-only account and crypt() returns *, the stored value is *, the strings are equal, and sshd logs you in. OpenSSH 10.6p2 fixes it by refusing to treat any stored hash that is too short to be real as a match.

The researchers report that all of these must be true for a host to be exploitable:

  • sshd is built against musl and does not use PAM (Alpine’s default openssh-server).
  • PasswordAuthentication is enabled, which is the OpenSSH default.
  • At least one account has * as its password field.
  • At least one other account has a real password hash, so sshd is using its normal password-checking code.

Not affected: glibc distributions such as Debian, Ubuntu, and Fedora; sshd using PAM; Dropbear; OpenBSD; and accounts locked with ! instead of *.

Why Alpine cloud images are the worst case

Alpine’s official AWS and Azure images, built with tiny-cloud, create a default alpine user that logs in with the SSH key you provide at launch. Its password field is *, and it has passwordless doas, which makes it effectively root. Researchers report affected images from 3.18.11 through 3.24.3. On those instances, an attacker who can reach port 22 goes from the internet to root in one login.

Two practical consequences:

  • Patching a running instance is not enough for new ones. Rebuild your AMIs and VM images, or launch from updated images, so autoscaling does not keep starting vulnerable hosts.
  • Security groups matter today. If port 22 is open to 0.0.0.0/0 on any Alpine instance, close it or restrict it to a bastion or VPN range while you patch.

Are Alpine-based containers affected?

Usually not, but check. The official alpine, node:*-alpine, python:*-alpine, and similar images do not install or run sshd. A container is only at risk if your Dockerfile adds openssh-server and starts it, which is common in CI runners, dev containers, SFTP sidecars, and legacy “SSH into the container” setups.

# Does the image include sshd?
docker run --rm --entrypoint sh your-image:tag -c 'apk list -I "openssh*" 2>/dev/null'

# Is sshd running in a live container?
docker exec your-container sh -c 'pgrep -a sshd || echo "no sshd"'

# Find Dockerfiles that install it
grep -rn --include='Dockerfile*' 'openssh' .

Embedded and network devices are a bigger worry. OpenWrt, Buildroot, and Yocto images that build OpenSSH (rather than Dropbear) against musl can be affected and are often patched slowly. Ask vendors for their status.

Check whether a host is exposed

# 1. Installed version (compare with the table above)
apk list -I 'openssh*'

# 2. Is password authentication on? (prints "passwordauthentication yes" if so)
sshd -T | grep -i '^passwordauthentication'

# 3. Which accounts have "*" as their password field?
awk -F: '$2 == "*" { print $1 }' /etc/shadow

If step 1 shows an older package, step 2 says yes, and step 3 lists any account that also has a login shell, the host is exploitable from anywhere that can reach its SSH port.

Look for signs of compromise

The bypass produces a normal successful password login, which is easy to spot on a host where nobody should be using passwords:

# Alpine logs sshd to syslog by default
grep 'Accepted password for' /var/log/messages*

# Compare against accounts that have no password
awk -F: '$2 == "*" { print $1 }' /etc/shadow

Any Accepted password line for an account whose password field is * means the host was compromised. Treat it that way: isolate it, preserve logs, check ~/.ssh/authorized_keys for every user, look for new accounts, cron jobs, and services, and rebuild from a known-good image rather than cleaning in place. If you ship logs to a central system, search there too, since an attacker with root can edit local logs. Rotate any secrets the host could read, such as cloud instance credentials, API keys in environment files, and database passwords.

Mitigations if you cannot patch right now

  • Turn off password logins. On hosts that only use keys, this closes the hole completely:
    echo 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf
    sshd -t && rc-service sshd restart
    sshd -T | grep -i '^passwordauthentication'   # expect "no"
    Put it in a file that sorts first, because sshd uses the first value it reads for each option. If your sshd_config does not include sshd_config.d, set the option in sshd_config itself.
  • Restrict who can reach port 22. Limit SSH to a bastion, VPN, or management network with security groups or firewall rules.
  • Disable sshd where you do not need it. Many containers and appliances run it out of habit. Use your platform’s exec or session manager instead.
  • Then patch anyway. Mitigations rely on configuration that can be reverted by the next image build. The fixed package removes the bug.

The lesson for your own login code: fail closed

sshole is not a memory bug. It is a fail-open logic flaw: a function signalled an error with a value that the caller then compared as if it were a real result. The same pattern shows up in web application and API authentication, and it is just as easy to miss in code review:

  • Length limits in hashing. bcrypt only uses the first 72 bytes of its input. In 2024, Okta disclosed that a cache key built by bcrypt-hashing the user ID, username, and password together could, for usernames of 52 characters or more, let a login succeed without the correct password, because the password fell past the 72-byte cutoff. Enforce explicit maximum lengths on credentials and never hash concatenated fields.
  • Sentinel values that look like data. If a helper returns "", null, "*", or 0 on failure, and the caller compares that against a stored value, a missing or locked record can “match.” Return explicit errors and check them first.
  • Constant-time comparison helpers that accept empty input. Comparing an empty submitted signature or token with an empty expected value returns true. Reject empty and malformed credentials before comparing.
  • JWT validation that trusts the token. Accepting alg: none, or choosing the verification key from the token header, are API-world versions of the same mistake. See JWT authentication vulnerabilities.
  • Locked and service accounts. Make sure accounts with no password, or flagged as disabled, cannot authenticate through any method, not just the one you tested.

The researcher found sshole by systematically trying more than 17,600 unusual login combinations across musl, glibc, and PAM configurations. That kind of exhaustive, unglamorous input testing is exactly what finds fail-open bugs, and it is now cheap enough to automate.

How DAST tools help you catch issues like this sooner

DastPilot is an API scanner. It does not test SSH daemons, and it cannot tell you whether an Alpine host is patched; use your package inventory, image scanner, or the commands above for that. What it does is apply the same “send what the developer did not expect” approach to the authentication layer of your APIs, which often run on the very Alpine images in the news this week. Dynamic application security testing exercises the deployed service from outside, so it catches fail-open behavior that only appears when real libraries, proxies, and configuration meet.

DastPilot scans your APIs from an OpenAPI spec or Postman collection, as every role you configure. The checks most relevant to this class of bug:

  • Missing authentication: calls every documented endpoint with no credentials and flags any that respond with data.
  • Broken token handling: sends tampered, expired, and malformed JWTs and missing auth headers, and flags endpoints that accept them.
  • Improper input handling: fuzzes parameters with values outside what your spec allows and flags server errors and unexpected success responses.
  • Privilege escalation (BFLA) and object access (BOLA): replays admin operations as lower roles and swaps IDs between users, so a foothold does not become full access.
  • Regression tracking: each scan is compared with the last, so an endpoint that starts accepting bad credentials after a base-image or dependency upgrade is flagged as reopened.

Use host and image scanning to find the vulnerable openssh packages, and DAST to confirm that what you deploy on top of them refuses bad credentials. Running both in your CI/CD pipeline means a base-image rebuild like this week’s is checked automatically.

Frequently asked questions

What is CVE-2026-123158 (sshole)?

CVE-2026-123158, nicknamed sshole, is a CVSS 8.1 authentication bypass in OpenSSH built against the musl C library without PAM, which is the default openssh-server package on Alpine Linux. When a password longer than 256 bytes is submitted, musl’s crypt() returns “*” as an error value, which matches the “*” Alpine stores for key-only accounts, so sshd accepts the login. It was disclosed and fixed on November 5, 2026.

Which Alpine versions are affected by CVE-2026-123158?

Alpine Linux 3.16 through 3.24 and edge are affected. Fixed openssh packages are 10.6_p2-r0 (edge), 10.3_p1-r2 (3.24), 10.2_p1-r1 (3.23), 10.0_p1-r11 (3.22), 9.9_p2-r1 (3.21), 9.7_p1-r6 (3.20), 9.6_p1-r3 (3.19), 9.3_p2-r4 (3.18), 9.1_p1-r7 (3.17), and 9.0_p1-r6 (3.16). Restart sshd after upgrading.

Is CVE-2026-123158 being exploited?

Yes. Threat intelligence firm Previdian observed exploitation attempts against its honeypots less than nine hours after disclosure on November 5, 2026. As of November 6 it was not yet in CISA’s Known Exploited Vulnerabilities catalog.

Are Debian, Ubuntu, or Alpine Docker containers affected?

Debian, Ubuntu, Fedora, and other glibc distributions are not affected, and neither is sshd using PAM or Dropbear. Official Alpine-based Docker images do not run sshd, so they are only affected if you install and start openssh-server in them.

How do I mitigate sshole without patching?

Set PasswordAuthentication no in sshd_config or an early-sorting file in sshd_config.d, validate with sshd -t, and restart sshd. Also restrict SSH access to trusted networks. These steps close the attack path on key-only hosts, but you should still install the fixed openssh package.

Can a DAST scanner find CVE-2026-123158?

No. CVE-2026-123158 is an SSH server bug and is found with package inventory and image scanning. API-focused DAST tools such as DastPilot test the same fail-open pattern in your own web APIs, sending missing, malformed, and tampered credentials to every documented endpoint and flagging any that are accepted.

Make sure your APIs fail closed

DastPilot sends missing, expired, and tampered credentials to every documented endpoint, tests BOLA and BFLA as each role, and rechecks on every scan. 30-day free trial, no credit card required.