この記事は英語で公開されています。

By UNST33R

CVE-2026-123158: the OpenSSH musl password bypass and the five-condition exposure test

OpenSSH 10.6p2 fixes a password authentication bypass on musl systems without PAM. This guide verifies the exact exposure conditions, patch path, incident hunt, and bounded red-team validation workflow.

OpenSSH released 10.6p2 on November 5, 2026 to close a password authentication bypass affecting a narrow but common Linux configuration: sshd built on musl libc, PAM absent or disabled, and password authentication enabled. A remote attacker who knows the name of a suitable account can authenticate with a long arbitrary password when the host also contains a conventional SHA-crypt password hash.

The issue is now tracked as CVE-2026-123158. The NVD record, published November 5 and updated November 6, lists CVSS 3.1 8.1 High with a network attack vector, no privileges, no user interaction, high impact, and high attack complexity. CISA's SSVC data in that record marks proof-of-concept exploitation as available. A public reproducer proves reachability; it does not prove exploitation against production systems.

This article gives defenders a precise exposure query, explains why five independent conditions must coincide, and shows how an authorized red team can validate the patch in a disposable lab. It also turns the discovery method into a repeatable AI-assisted differential-testing workflow without giving a model access to a live SSH service.

The verified timeline

DatePrimary sourceConfirmed fact
November 5, 2026OpenSSH 10.6p2 release notesThe project shipped a critical workaround for password authentication bypass on Linux systems using musl with PAM disabled.
November 5, 2026Upstream fix commitThe password comparison now rejects stored values shorter than four characters and cleans up copied password data.
November 5, 2026Alpine security advisoryAlpine published fixed packages for supported releases and backports through 3.16, with an explicit daemon-restart requirement.
November 5, 2026musl project advisoryOpenSSH versions before 10.6p2 using musl are affected when UsePAM=no and PasswordAuthentication=yes; disabling password authentication is the immediate mitigation.
November 5, 2026NVD CVE-2026-123158 recordThe formal record identifies OpenSSH before 10.6p2 on Linux with musl and no PAM. NVD status was Received when checked November 6.

Alpine's advisory initially said no CVE had been assigned. That statement describes the publication moment. The NVD record appeared later the same day, so current inventories should use CVE-2026-123158.

Exposure requires five conditions

Media summaries often compress this issue into “Alpine SSH accepts any password.” That loses the conditions defenders need for triage. A host is exposed only when every row below evaluates true.

ConditionHow to verifyWhy it matters
sshd uses musl libcInspect the executable with ldd, package metadata, or /lib/ld-musl-*.so.1The relevant crypt() error path returns * on musl.
PAM is absent or disabledCheck the build, linked libraries, and effective UsePAM valueA PAM-backed password check takes a different path.
Password authentication is enabledRun sshd -T and inspect passwordauthenticationKey-only services with password login disabled do not expose the vulnerable operation.
A login-capable account has exactly * in its password fieldReview /etc/shadow, /etc/passwd, and directory-service mappingsThe failed hash operation can return the same one-character value.
Another local account has a $5$ or $6$ hashReview the password field types without copying hashes into tickets or chatOpenSSH borrows a usable salt for the timing-equalization path.

The Alpine advisory says a 257-to-1024-byte password triggers the vulnerable path. The current NVD description says 256 to 1024, while the reporter's tested boundary and musl's 256-byte maximum establish 257 as the first successful length. Use the vendor and reproducer boundary when writing detection or regression cases.

Root is not automatically reachable. OpenSSH's default PermitRootLogin prohibit-password blocks password login to root. Key-only service users remain important targets, and Alpine's official tiny-cloud images shipped an alpine user with passwordless doas. Alpine says affected cloud images become exploitable once any conventional $6$ password hash exists on the machine.

Docker hosts are not exposed merely because they run Alpine containers. A container must actually run a reachable vulnerable sshd and satisfy the remaining conditions. Likewise, a musl-based device using Dropbear is outside this OpenSSH-specific path; the musl advisory explicitly says Dropbear is unaffected.

Why one character becomes authentication

The failure comes from a valid-looking value crossing three historical behaviors.

First, Unix systems use * as a password-field sentinel for accounts that should not accept password login. It is deliberately too short to be a real password hash.

Second, musl changed crypt() error handling in 2012. Instead of returning a null pointer, a failure returns an unmatchable string. For the relevant path that value is *. The reporter's technical timeline links the original musl commits and shows the 256-byte SHA-crypt input cap.

Third, OpenSSH added fake work in 2016 to reduce username-enumeration timing differences. When an account does not supply a usable salt, OpenSSH selects one from another local password hash and still computes the candidate. On vulnerable builds, a password longer than musl's cap makes crypt() return *. The old code then compared that return value with the target account's stored * and accepted equality.

The November 5 patch inserts MIN_PASSWORD_HASH_LEN 4 into the acceptance expression. A one-character sentinel can no longer reach a successful comparison. The patch also duplicates and zero-frees password-field data so the caller does not retain pointers into shared library storage.

This is a compositional security failure. Each component carried an assumption that was locally understandable. The system became vulnerable when an error sentinel, a lock sentinel, and a timing defense shared the same comparison path.

Inventory first, then patch and restart

Run read-only checks through your configuration-management system. Avoid copying /etc/shadow content into a central log. The following commands return effective settings and category counts while keeping hashes off stdout:

sshd -V 2>&1 | head -1
sshd -T | awk '$1 == "usepam" || $1 == "passwordauthentication" || $1 == "permitrootlogin"'
ldd "$(command -v sshd)" 2>&1 | grep -E 'musl|pam' || true
awk -F: '$2 == "*" {count++} END {print "star_accounts=" count+0}' /etc/shadow
awk -F: '$2 ~ /^\$[56]\$/ {count++} END {print "sha_crypt_accounts=" count+0}' /etc/shadow

Treat the version string carefully. Distribution backports may fix an older OpenSSH version without renaming it to 10.6p2. Alpine publishes exact fixed package revisions by branch, including 10.3_p1-r2 for 3.24 and 9.9_p2-r1 for 3.21. Compare package versions with the vendor advisory for the running distribution.

On Alpine, the official response is:

apk upgrade -U -a
sshd -t && rc-service sshd restart
sshd -T | grep -i passwordauthentication

The restart is part of remediation. Alpine warns that upgrading the package alone leaves the old daemon running. If a maintenance window blocks the update, confirm key access in a second session, keep the current session open, set PasswordAuthentication no, validate with sshd -t, restart, and verify the effective configuration. Apply the package fix afterward so a later configuration change cannot reopen the path.

Hunt for successful password login to passwordless accounts

The strongest host-level signal is an Accepted password for event naming an account whose password field is *. Alpine tells administrators to inspect /var/log/messages, then review doas use and recently created users, files, and authorized keys.

Build the hunt from two datasets:

  1. Extract successful password-authentication events from retained SSH logs, including rotated and centralized copies.
  2. Join each username and event time to historical identity state where possible. Current /etc/shadow data may have changed after compromise or remediation.

Prioritize events for alpine, root when password root login was enabled, key-only deployment users, and directory-backed identities exposed through the affected mapping. Follow each hit with source address, session commands, doas or sudo, new users, changed authorized_keys, cron and init changes, package installation, outbound connections, and cloud-instance credential use.

An exposed host with incomplete logs deserves incident treatment. The official advisory says to treat the machine as compromised when a login cannot be ruled out. Preserve volatile evidence before rebuilding, rotate secrets reachable from the host, revoke instance or workload credentials, and check lateral targets. A clean vulnerability scan proves the current package state; it cannot prove the absence of an earlier session.

Validate the fix in a disposable lab

The reporter published a small Docker reproducer and host checker. Keep reproduction bound to loopback and disposable identities. Do not point the attack script at an address outside written scope.

A useful regression matrix has four variants:

Lab variantExpected result
Vulnerable Alpine package, no PAM, password auth on, * target plus SHA-crypt donor256-byte case fails; 257-byte case authenticates
Same image with fixed OpenSSH package and restarted daemonBoth cases fail
Vulnerable package with PasswordAuthentication noPassword method unavailable
PAM-enabled server with UsePAM yesLong-password bypass fails

Record the image digest, package revision, sshd -T output, libc identity, target password-field category, donor-hash category, and authentication result. Do not preserve real password hashes in the artifact. This matrix exercises the boundary and both operational mitigations.

The architecture from the bounded penetration-testing agent guide applies directly: a model may propose cases, while a deterministic worker selects one of the four local containers. The worker rejects arbitrary hosts, ports, usernames, password lengths, and commands. The multi-agent attack-surface primer explains why delegated workers need the same scope checks as the planner.

Use an LLM for differential review, outside the execution path

The OpenSSH release notes make an unusual disclosure: the project is receiving many AI-assisted security reports, and independent researchers have later rediscovered some AI-identified bugs. The project plans more frequent releases because adversaries can find the same classes without reporting them. The reporter says agent swarms exercised about 17,600 unusual login combinations across libc, PAM, shadow, and build variants.

That method is more useful than asking a model to “find an SSH zero-day.” Give a reduced-refusal model a bounded job: enumerate state combinations from a patch, explain mismatched outcomes, and draft regression assertions. A human owns the threat model and a local harness owns execution.

curl https://api.unst33r.si/v1/chat/completions \
  -H "Authorization: Bearer $UNST33R_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "unst33r-deepseek",
    "temperature": 0,
    "messages": [
      {
        "role": "system",
        "content": "You review supplied source diffs and synthetic test outcomes for an authorized local lab. Return hypotheses and regression cases. Do not provide commands or external targets."
      },
      {
        "role": "user",
        "content": "Given four dimensions (musl/glibc, PAM on/off, password auth on/off, stored field star/real hash) and outcomes from our loopback fixtures, identify the smallest condition set that explains an unexpected successful login. Cite only the supplied rows."
      }
    ]
  }'

unst33r-deepseek is suited to patch and test-matrix analysis, while unst33r-flash can expand a reviewed matrix into high-volume synthetic cases. Keep the API away from /etc/shadow, production hostnames, credentials, and live sockets. The DeepSeek acceptance guide shows how to validate JSON and tool-call stability before connecting a model to any harness.

The release gate should require deterministic evidence: vulnerable fixture succeeds only at the documented boundary, fixed fixtures reject it, mitigated configurations reject it, and every case maps to an immutable container digest. Model prose can suggest missing combinations. It cannot adjudicate whether authentication occurred.

Response checklist

  • Inventory musl-based hosts and appliances that actually run OpenSSH.
  • Resolve the effective PAM and password-authentication settings with sshd -T.
  • Identify * accounts and the presence of SHA-crypt donor hashes without exporting secrets.
  • Upgrade to a vendor-fixed package and restart the daemon.
  • Disable password authentication immediately where patching is delayed.
  • Hunt historical successful password logins to passwordless or key-only accounts.
  • Investigate privilege escalation, persistence, credential access, and lateral movement for every match.
  • Validate the package and mitigation in an isolated regression matrix.
  • Add the five-condition query to continuous asset policy so configuration drift cannot recreate exposure.

CVE-2026-123158 is severe because a password check can collapse into one network request under the right configuration. It is also highly triageable. Five concrete conditions define exposure, upstream has shipped a compact fix, Alpine has backported packages, and the most valuable forensic signal is specific. Patch the daemon, restart it, then use the incident hunt and lab matrix to answer the two questions a version scanner cannot: whether the vulnerable path was reachable and whether anyone used it.