Advisory and technical analysis of CVE-2026-123158, an OpenSSH sshd password authentication bypass on musl-based Linux, with root cause, reproduction steps, detection rules and remediation.
sshd running without PAM on musl libc-based Linux (typically Alpine) that allows authentication to pass for accounts without a password (the /etc/shadow field is *) when a password longer than 256 bytes is supplied.alpine user in Alpine tiny-cloud).| Item | Details |
|---|---|
| CVE ID | CVE-2026-123158 (aliases: SSHhole, *sshole, sshhole) |
| Disclosure date | 2026-11-05 (OpenSSH 10.6p2 and Alpine advisory published, MITRE record posted) |
| Affected product/version | OpenSSH sshd < Portable 10.6p2, but only under the conditions: linked against musl libc + PAM not used + password authentication enabled. Alpine 3.16 ~ 3.24 and edge |
| Patched version | OpenSSH Portable 10.6p2 (2026-11-05). Alpine backported to each branch (see table below) |
| CVSS v3.1 | 8.1 (High) — CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (MITRE / cve.org / Red Hat). NVD's own analysis is pending at the time of writing |
| CVSS v4.0 | Not confirmed (no official v4 vector published) |
| CWE | CWE-303 (Incorrect Implementation of Authentication Algorithm) — per Red Hat classification |
| Actual exploitation status | No exploitation reports (as of 2026-11-06). Not listed in CISA KEV. The CISA SSVC assessment in the CVE record is "proof of concept" (not automatable, total technical impact) |
Note on severity interpretation: MITRE assigned 8.1 with AC:H (high attack complexity) to reflect the attack preconditions (account configuration), but OpenSSH describes it as critical, saying "on hosts that meet the conditions, a single login yields a shell." It is safer to treat hosts that meet the conditions as critical.
sshd running without PAM verifies passwords itself. It hashes the supplied password with crypt() and then compares the result as a string against the stored value in /etc/shadow. The stored value for an account without a password is usually a single character *, and a normal crypt() output should never be able to equal this value.
The key point is that two decisions from different projects collide on the same single character *.
crypt() fails, it returns the string *. Also, the SHA-256/SHA-512 implementations reject keys longer than 256 bytes (KEY_MAX 256) and treat them as failures. That is, a password of 257 bytes or more is "hashed" to *.*0 (or *1), so it can never equal the stored *. Therefore glibc distributions (Debian, Ubuntu, RHEL, etc.) are not affected.As a result, on musl hosts crypt(long_password) == "*" holds, matching the stored * and allowing login. Two secondary conditions make the attack work.
*, there is no valid salt. To eliminate timing differences usable for username guessing (the CVE-2016-6210 response), sshd borrows the salt of the first real hash it finds in /etc/passwd order. Because of this, the host must have at least one account with a $5$/$6$ hash.$6$ salt, musl rejects anything over 256 bytes and returns *.Based on the IONIX lab reproduction, all of the following are required for an actual successful login.
| # | Condition |
|---|---|
| 1 | sshd is linked against musl libc |
| 2 | sshd runs without PAM (Alpine's default openssh-server, or UsePAM no) |
| 3 | PasswordAuthentication yes (OpenSSH default) |
| 4 | The target account's shadow field is exactly * (!, !*, empty value, *NP*, etc. do not qualify) |
| 5 | In /etc/passwd order, the first hashed account uses $5$ or $6$ |
| 6 | The password is 257–1024 bytes and is sent as the second attempt on the same connection |
"Second attempt" in condition 6: on the first attempt,
pick_salt()callsgetspnam()for multiple accounts and overwrites musl's static buffer, so the first comparison fails. On the second attempt, with the salt cached, the target field is read as*again and the comparison succeeds. Both attempts must occur on a single TCP connection (each connection spawns a newsshdprocess with an empty cache). Therefore, a scanner that sends only one password per connection will misjudge a vulnerable host as healthy.
The fix changes sys_auth_passwd (auth-passwd.c) and two compatibility files in OpenSSH 10.6p2.
| Category | Before (< 10.6p2) | After (10.6p2) |
|---|---|---|
| Stored hash length check | None — even a single-character * is compared | Stored hashes shorter than 4 characters are rejected from matching |
shadow_pw() return | A pointer to musl's static getspnam() buffer (aliasing) | Returns a separate copy (aliasing removed) |
| Result | When crypt() returns *, it matches the stored * → login | * (1 character) is shorter than 4 characters, so matching itself is rejected |
OpenSSH considers the root cause to lie outside sshd (in musl's
crypt()behavior) and calls the 10.6p2 fix a "workaround." The musl maintainer (Rich Felker) takes the position that this is not a musl bug but misuse by the caller, and has announced a behavior change in the next release cycle. Either way, the fix you can apply today is in sshd (10.6p2).
| Condition | Details |
|---|---|
| Authentication | Not required (PR:N). No need to know the target account's password |
| User interaction | Not required (UI:N) |
| Network position | Remote. Must be able to reach the SSH port (AV:N) |
| Complexity | High (AC:H) — all six conditions above must hold |
| Impact scope | No change (S:U), Confidentiality/Integrity/Availability High |
sequenceDiagram
autonumber
participant A as 공격자
participant S as sshd (musl, PAM 미사용)
participant Sh as /etc/shadow
A->>S: SSH 연결 수립, 대상 계정(필드 "*")으로 로그인 시도
Note over A,S: 1차 시도 — 임의 비밀번호
S->>Sh: pick_salt(): passwd 순서로 첫 해시 계정의 $6$ salt 차용
Note over S: getspnam() 반복 호출로 musl 정적 버퍼 덮어씀 → 1차 비교 실패
A->>S: 같은 연결에서 2차 시도 — 257~1024바이트 비밀번호
S->>S: crypt(긴 비밀번호, 차용한 $6$ salt) → musl이 256B 초과 거부 → "*" 반환
S->>Sh: 저장 필드 "*"와 비교
Note over S,Sh: "*" == "*" → 일치
S-->>A: 로그인 허용 (셸 또는 포트 포워딩)