OFFSEC · Offensive Security

OpenSSH ‘sshole’ on Alpine: patch the package, restart the daemon, rebuild the image

CVE-2026-123158 lets an unauthenticated attacker log in to password-disabled accounts on musl-based Linux running OpenSSH without PAM. Exploitation followed disclosure within hours. Version-based scanning will both miss and over-report it.

The finding

A ten-year-old interaction between OpenSSH and the musl C library became an unauthenticated login path on 5 November. Portable OpenSSH 10.6p2 was released that day with what Damien Miller called “a critical security workaround” for Linux systems that use musl and have PAM disabled [1]. The issue is tracked as CVE-2026-123158 and nicknamed sshole. Previdian reported its first observed exploitation attempt less than nine hours after the CVE was published [5]. The fix is simple. Confirming that it has taken effect is not.

What is affected

The exposure is narrow in configuration and wide in deployment. It requires sshd before 10.6p2, built against musl, running without PAM, with password authentication enabled, which is the default [4][5]. Alpine Linux’s default openssh-server package is built exactly this way [4][8]. Other musl-based builds, including OpenWrt, Buildroot and Yocto images that run OpenSSH rather than Dropbear, need checking [4][5].

The account conditions matter. SOCRadar lists four that must all hold: no PAM, password logins enabled, at least one account whose password field is “*”, and at least one other local account with a real SHA-crypt hash [4]. Accounts locked with a leading exclamation mark are not affected [8]. The attacker must know the name of the passwordless account [3][7].

Alpine’s official cloud images satisfy the account condition by design. From 3.18.11 through 3.24.3 the default “alpine” user has a “*” password field and passwordless doas [3][4]. Where another account holds a real password, a login as “alpine” leads to root [4][5]. Root itself is out of reach under OpenSSH’s default PermitRootLogin setting unless an administrator changed it [5].

Not affected: glibc-based distributions such as Debian, Ubuntu, Fedora and Red Hat Enterprise Linux, systems that check passwords through PAM, Dropbear, non-Linux systems, and hosts with PasswordAuthentication set to no [4][5][9].

The root cause, and the disagreement about it

musl’s crypt() does not return a null pointer on failure. It returns a failure token, normally “*” [2]. A shadow entry of “*” therefore matched a failed hash. Rich Felker, musl’s maintainer, wrote that this is “not a bug in musl just an erroneous use by the caller” [2]. Miller’s announcement says the root cause lies outside sshd but that it is exploitable via sshd and can be avoided there [1]. Felker nonetheless plans to propose moving musl’s failure tokens to the more common “*0″/”*1” convention and to revisit returning an error instead [2].

Accounts of how the condition arose differ in detail. CSO describes a 2012 musl length cap, a 2016 OpenSSH change and a 2022 Alpine change to root’s password field combining into the flaw [3]. The Hacker News traces it to the 2016 fix for CVE-2016-6210 [6]. Botmonster attributes OpenSSH’s 2016 password length cap to CVE-2016-6515 [12]. The practical consequence is the same: other non-PAM crypt() callers on musl deserve an audit, not only sshd [12].

Exploitation: the figures disagree, and they move

SOCRadar wrote on 6 November that no in-the-wild exploitation had been reported and that CISA’s enrichment rated status as proof of concept [4]. The same day, Help Net Security reported that Previdian had confirmed root access on an Alpine honeypot, with eight attempts from one Japan-based IP address caught by one sensor [5]. By 8 November The Hacker News reported 20 attempts from 13 unique IP addresses across nine countries, with post-exploitation limited to reconnaissance commands [6]. Horizon3 states exploitation has been confirmed [7].

Security Affairs reports that CISA added the CVE to its Known Exploited Vulnerabilities catalogue on 6 November [11]. Help Net Security, writing that day, said CISA had not yet listed it [5]. Security Affairs cites Red Hat for exploitation [11]; Red Hat’s CVE page, as retrieved, contains no exploitation statement and says Red Hat products are not affected [9]. Severity also differs. MITRE as CNA scores CVSS 8.1 with high attack complexity [4][9]. Red Hat’s preliminary score is 9.8 [9].

Previdian warned that proof-of-concept code on GitHub is unverified and may contain malware [5]. watchTowr’s Jake Knott expected SSH brute-forcers to adopt the technique quickly [3].

Why scanners will get this wrong

Version matching cannot tell a musl build from a glibc build. CyCognito reports that about three quarters of the assets it flagged matched on version alone, and none was confirmed exploitable by active testing [8]. Debian’s tracker marks bookworm and trixie packages as vulnerable while rating the urgency unimportant, because Debian links against glibc [10]. Expect noise from glibc hosts.

The opposite error is just as likely. Alpine backported fixes to branches 3.16 through 3.24 without changing upstream version numbers; 3.24 is fixed at 10.3_p1-r2, not 10.6 [4][8]. A host reporting an old upstream version may already be patched. A host with the new package may still be running the old binary, because installing the package does not restart sshd [4][5][8]. And a host update does nothing for an Alpine-based container image that runs sshd [12].

What to do

  • Inventory musl-based systems that run OpenSSH with PAM disabled or UsePAM no. Check the package release against Alpine’s fixed list, not the upstream version string [4][8].
  • Update and restart sshd. Confirm the running process is new [4][5].
  • Where patching is delayed, set PasswordAuthentication no, including inside Match blocks, validate the configuration and keep an existing session open while testing key logins [4].
  • Audit /etc/shadow for accounts whose password field is exactly “*” [8].
  • Rebuild and redeploy Alpine-based images that run sshd. Images built from 3.21.10, 3.22.8, 3.23.8 or 3.24.4 and later already include the fix [4].
  • Hunt for “Accepted password for” log entries on accounts that should never accept passwords, review doas use, new users and authorized_keys, and treat any host where a login cannot be ruled out as compromised [5][6].
  • Restrict TCP/22 to trusted networks or a bastion [8].

Domain close

This is the shape of a modern edge-of-estate flaw. It sits between two projects, each of which can argue the other owns it. It affects the small images that teams pick precisely because they carry less. And it defeats the two shortcuts defenders rely on most: the version string and the package update. Patch the package. Restart the daemon. Rebuild the image. Then check that all three happened.

Sources

Every R3KONX article cites its primary material. 12 sources, in order of first citation. Links open the original publication.

  1. Announce: Portable OpenSSH 10.6p2 released oss-security mailing list (Damien Miller, OpenSSH) · 2026-11-05
  2. Follow-up to musl advisory for OpenSSH users (crypt failure tokens) musl mailing list (Rich Felker) · 2026-11-06
  3. OpenSSH flaw lets attackers access password-disabled accounts on some Linux systems CSO Online · 2026-11-05
  4. sshole: OpenSSH Fixes Password Bypass on Alpine Linux SOCRadar · 2026-11-06
  5. OpenSSH flaw exploited in the wild just hours after disclosure (CVE-2026-123158) Help Net Security · 2026-11-06
  6. Hackers Target OpenSSH SSHole Flaw Within Hours of Disclosure, Gain Root on Honeypot The Hacker News · 2026-11-08
  7. CVE-2026-123158: OpenSSH musl Bypass (*sshole) Horizon3.ai · 2026-11-06
  8. Emerging Threat: (CVE-2026-123158) OpenSSH Password Authentication Bypass on musl Linux CyCognito · 2026-11-09
  9. CVE-2026-123158 Red Hat Customer Portal · undated (retrieved 2026-11-11)
  10. CVE-2026-123158 Debian Security Tracker · undated (retrieved 2026-11-11)
  11. U.S. CISA adds IBM, SignalWire FreeSwitch, OpenSSH, and GPUStack flaws to its Known Exploited Vulnerabilities catalog Security Affairs · 2026-11-10
  12. OpenSSH took the blame for musl's Alpine login bug Botmonster Tech · 2026-11-06

Researched and written by the R3KONX Analysis Desk from the cited primary material. In-the-wild exploitation figures come from a single sensor operator as reported by the trade press, and the CISA catalogue page could not be retrieved, so the KEV listing date is cited second-hand. Corrections: event@r3konx.asia.

R3KONX 2027

Work in this domain? So does the programme

4–6 May 2027, World Trade Centre Kuala Lumpur. Curated talks, hands-on training and The BattleGrid.