# OpenSSH on musl without PAM accepts any long password for passwordless accounts

Source: https://startwithidentity.com/cves/cve-2026-123158/
Last updated: 2026-11-22
License: content by Start with Identity. Cite the source URL.

---

## What broke

Without PAM, sshd checks a password by running it through `crypt()` and comparing the result with the account's shadow field. Alpine Linux's advisory of November 5, 2026 explains the failure: on musl, `crypt()` returns `*` for keys over 256 bytes, and "`*` is also exactly what the stored field contains for every account with no password," so the comparison matches. NVD describes it as sshd in OpenSSH before 10.6p2 on Linux "when musl libc is used without PAM," where for some accounts "any password between 256 and 1024 characters succeeds." The CWE is CWE-394 (unexpected status code or return value) and the MITRE score is CVSS 3.1 8.1.

Alpine lists the conditions: password authentication on (the default), the non-PAM `openssh-server` package or `UsePAM no`, a target account whose password field is `*` (key-only users, or `root` in the base image), and at least one other account with a `$5$` or `$6$` hash. Upstream fixed it in OpenSSH 10.6p2 and Alpine shipped fixed packages back to 3.16. CISA added it to KEV on November 9, 2026.

## Why it matters

A `*` in the shadow file is supposed to mean "this account cannot log in with a password." Many admins create key-only accounts on that assumption and give them `doas` or sudo rights. Here the marker became a valid password, so an internet-facing container or cloud VM could be entered as root without any credential. Alpine notes its official cloud images ship an `alpine` user with a `*` password and passwordless `doas`, which becomes exploitable once any `$6$` hash exists on the box.

## What to do

- Upgrade to OpenSSH 10.6p2 or your distribution's fixed package, then restart sshd. The running daemon keeps the old code until it restarts.
- Where you cannot patch yet, set `PasswordAuthentication no` and confirm key login works before closing your session.
- Search logs for `Accepted password for` on accounts that have no password, such as `root`, `alpine` or key-only service users.

## After you patch

- If such a login appears, treat the host as compromised: review new users, `authorized_keys` files and `doas` or sudo use, and rotate any secrets the host held.

## Sources

- [NVD: CVE-2026-123158](https://nvd.nist.gov/vuln/detail/cve-2026-123158)
- [Alpine Linux: OpenSSH password authentication bypass (November 5, 2026)](https://alpinelinux.org/posts/2026-11-05-openssh-password-authentication-bypass/)
- [OpenSSH 10.6p2 release notes](https://www.openssh.org/releasenotes.html#10.6p2)
- [CISA Known Exploited Vulnerabilities catalog, added November 9, 2026](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-123158)
