Tag: CVE-2026-123158

Detecting sshole: 5 Sigma rules for OpenSSH on musl, from login to persistence

Detecting sshole: 5 Sigma rules for OpenSSH on musl, from login to persistence

Most detections for an authentication bypass start with the exploit request. Here there isn’t one to see. The sshole bug in OpenSSH on musl (CVE-2026-123158) lets an attacker log in to an account that has no password by sending a password longer than 256 bytes, and sshd never writes the password or its length to a log. The packets are encrypted. If you were waiting for an IDS signature, you’ll keep waiting.

What the bug can’t hide is its result: a password login to an account that can’t have one, followed by an attacker doing things on an Alpine box. I covered the bug itself in my analysis of sshole. This post is the defender’s half: five Sigma rules, one on the sshd log and four on process creation, built on the Alpine advisory, the researcher’s guidance and what GreyNoise recorded attackers doing on compromised hosts on November 7 and 8, 2026.

At a glance

  • Rules: 5 (2 emerging threat, 2 generic TTP, 1 hunting).
  • Domain: Linux (Alpine and other musl hosts).
  • Log sources: sshd log (product: linux, service: sshd) and process creation with full command line (category: process_creation, from auditd, Falco, Tetragon, Sysmon for Linux or an EDR).
  • ATT&CK: T1190, T1078.003, T1059.006, T1071.001, T1572, T1543, T1548.003.
  • Status: two rules test (source-confirmed signal or IOCs), three experimental (my generalisation of observed behaviour).
  • GitHub: Detection Rules/Linux.

The case in brief

On a musl system running sshd without PAM, crypt() fails on an overlong password and returns the string *. Accounts locked with * in /etc/shadow then match. On Alpine that includes root (since 3.16), key-only users, musl-nscd directory users and the alpine user on official cloud images, which also has passwordless doas. The full root cause and exposure conditions are in the analysis.

Each step leaves a trace somewhere different. The login itself shows up as a normal Accepted password for <user> from <ip> port <n> ssh2 line from sshd. After that, GreyNoise’s capture of one intrusion cluster shows the attacker run recon over non-interactive SSH (id, uname -a, cat /etc/os-release), probe for root with doas -n id, unpack a Python 3.12 runtime into /opt/py3, pin the C2 domain tac.vpnla.org in /etc/hosts, start a second sshd on port 2222 with TCP forwarding, and install a Python implant called TAC Agent as an OpenRC service. BleepingComputer, citing GreyNoise, adds attempts to read password hashes and root SSH keys and to change authorized_keys. All of that is process creation, as long as you collect it.

Detection map

Block diagram: sshd log and process creation telemetry feed five Sigma rules (password login to root or alpine, TAC Agent activity, extra sshd listener, OpenRC service persistence, non-interactive doas), mapped to ATT&CK T1190, T1078.003, T1059.006, T1071.001, T1572, T1543 and T1548.003, with gaps for password length, SSH key changes and shadow reads.
What each log source catches for sshole, and what nothing catches.

The left column is the honest part. Every host has an sshd log, but on Alpine it goes to /var/log/messages through busybox syslogd, which keeps it local and rotates it small unless you forward it. Process creation needs an agent that Alpine doesn’t ship, and most embedded musl devices can’t run one. So rule 1 is the one you’ll have almost everywhere, and rules 2 to 5 are for the Alpine servers, VMs and containers where you can collect command lines. The dashed box lists what nothing here sees.

Rule overview

RuleDomainLog sourceATT&CK (tactic / technique)LevelStatus
Password login to root or alpineLinuxlinux / sshdInitial Access / T1190, T1078.003Hightest
TAC Agent implant activityLinuxlinux / process_creationExecution, C2, Persistence / T1059.006, T1071.001, T1543Hightest
Extra sshd listener with forwardingLinuxlinux / process_creationCommand and Control / T1572Highexperimental
OpenRC service persistenceLinuxlinux / process_creationPersistence / T1543Mediumexperimental
Non-interactive doas (hunting)Linuxlinux / process_creationPrivilege Escalation / T1548.003Lowexperimental

The rules

1. Potential CVE-2026-123158 exploitation: SSH password login to root or alpine

Context: this is the signal both Wakefield and the Alpine advisory point to. An account with * in its shadow field has no password, so a successful password login to it means the bypass worked. On a stock Alpine host the two * accounts you can name in advance are root and the cloud-image alpine user.

Condition: alert when sshd logs Accepted password for root from or Accepted password for alpine from.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application, with T1078.003 Local Accounts for the login it produces.

title: Potential CVE-2026-123158 Exploitation - SSH Password Login To Root Or Alpine Account
id: 2e635140-37d2-48cd-913d-ee473f0b36f9
status: test
description: |
    Detects a successful sshd password login for the "root" or "alpine" account. On Alpine Linux both ship with "*"
    in /etc/shadow and have no password, so on a musl-based sshd without PAM a password login to them is the main
    sign of sshole (CVE-2026-123158) exploitation. Scope this rule to Alpine and other musl hosts.
references:
    - https://alpinelinux.org/posts/2026-11-05-openssh-password-authentication-bypass/
    - https://wakefield.co/research/openssh-musl-authentication-bypass
    - https://nvd.nist.gov/vuln/detail/CVE-2026-123158
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.initial-access
    - attack.t1190
    - attack.t1078.003
    - cve.2026-123158
    - detection.emerging-threats
logsource:
    product: linux
    service: sshd
detection:
    keywords:
        - 'Accepted password for root from'
        - 'Accepted password for alpine from'
    condition: keywords
falsepositives:
    - Hosts where an admin set a real root password and enabled PermitRootLogin yes (common on glibc distributions, rare on Alpine)
    - Alpine hosts where the alpine user was deliberately given a password
level: high

View on GitHub

False positives and tuning: scope it to your Alpine and musl host group. On glibc distributions with PermitRootLogin yes and a real root password, root password logins are legitimate (and a separate problem). Root itself is protected on Alpine by the default PermitRootLogin prohibit-password, so the alpine line is the one most likely to fire for real. Other * accounts (key-only users, directory users) vary per host, so Sigma can’t list them. Join your sshd logs against a per-host list instead. On one host:

# accounts whose password field is exactly "*"
awk -F: '$2=="*"{print $1}' /etc/shadow > /tmp/star_accounts

# password logins to any of them
grep -h "sshd.*Accepted password for" /var/log/messages* 2>/dev/null \
  | grep -wFf /tmp/star_accounts

In Splunk, feed it a lookup of * accounts per host from your config management and tune the extraction to your syslog format:

index=os sourcetype=syslog process=sshd "Accepted password for"
| rex "Accepted password for (?<user>\S+) from (?<src>\S+)"
| lookup star_accounts.csv host, user OUTPUT locked
| where locked="true" OR in(user, "root", "alpine")
| stats count min(_time) as first max(_time) as last by host, user, src

How to test: on a lab host that forwards syslog, logger -t 'sshd[1234]' 'Accepted password for alpine from 192.0.2.10 port 50000 ssh2' writes a line in the same format. No exploit needed.

2. TAC Agent C2 implant activity seen after CVE-2026-123158 exploitation

Context: one attacker GreyNoise tracked got root on an Alpine host and installed TAC Agent, a Python C2 agent, with its own Python runtime, an /etc/hosts entry for its C2 domain and an OpenRC service. GreyNoise says the agent never reached its server or received a task, but the setup is distinctive and the strings are specific.

Condition: alert on any command line that mentions tac_agent.py, tac.vpnla.org, tac-agent.init, /etc/init.d/tac-agent, rc-service tac-agent or rc-update add tac-agent. Commands sent over an SSH exec channel run as sh -c '<command>', so even the echo ... >> /etc/hosts pinning shows up in the shell’s command line.

ATT&CK: Execution (TA0002) – T1059.006 Python; Command and Control (TA0011) – T1071.001 Web Protocols; Persistence (TA0003) – T1543 Create or Modify System Process.

title: TAC Agent C2 Implant Activity Seen After CVE-2026-123158 Exploitation
id: 725fec7b-3138-4c73-a077-bef014f69788
status: test
description: |
    Detects command lines referencing the TAC Agent Python implant, its OpenRC service or its C2 domain, as observed
    by GreyNoise on Alpine hosts compromised through sshole (CVE-2026-123158) in November 2026. Covers the agent run,
    the service install and the /etc/hosts pinning of the C2 domain when run through an SSH exec channel.
references:
    - https://sshole.events.greynoise.io/
    - https://bleepingcomputer.com/news/security/hackers-exploit-sshole-openssh-flaw-to-breach-linux-systems
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.execution
    - attack.t1059.006
    - attack.command-and-control
    - attack.t1071.001
    - attack.persistence
    - attack.t1543
    - cve.2026-123158
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        CommandLine|contains:
            - 'tac_agent.py'
            - 'tac.vpnla.org'
            - 'tac-agent.init'
            - '/etc/init.d/tac-agent'
            - 'rc-service tac-agent'
            - 'rc-update add tac-agent'
    condition: selection
falsepositives:
    - Threat intel or IR staff grepping for these strings on a host (exclude your own analysis accounts)
level: high

View on GitHub

False positives and tuning: the only realistic ones are your own responders grepping for these strings, so exclude their accounts. This is an IOC rule: it will age as soon as the operator renames the file or changes domain. GreyNoise lists the C2 address as 104.21.88.83, which looks like shared CDN space to me, so I left IPs out of the rule. Add a DNS query for tac.vpnla.org in your resolver logs if you have them.

How to test: sh -c 'echo tac_agent.py test' produces a matching command line and does nothing else.

3. Additional sshd listener started with forwarding options or from a shell

Context: the same intruder ran /usr/sbin/sshd -p 2222 -o AllowTcpForwarding=yes, a second SSH daemon, independent of the main one, that gives the attacker a tunnel into the internal network (GreyNoise also captured nc -z probes of internal ports). Putting forwarding options on sshd’s command line is unusual. Normal setups keep them in sshd_config.

Condition: alert when an sshd process starts with AllowTcpForwarding=yes, GatewayPorts=yes or PermitTunnel=yes on its command line, or starts with -p and its parent is a shell, busybox, doas or sudo. This generalisation is my inference from one observed command, so the rule is experimental.

ATT&CK: Command and Control (TA0011) – T1572 Protocol Tunneling.

title: Additional sshd Listener Started With Forwarding Options Or From A Shell
id: e2c8278b-f88d-40c8-a9a4-3a339e3b0712
status: experimental
description: |
    Detects an sshd process started with forwarding or tunnelling options on its command line, or started with a
    custom port by a shell or doas. After sshole (CVE-2026-123158) exploitation, GreyNoise observed attackers start a
    second sshd on port 2222 with AllowTcpForwarding=yes to keep a tunnel into the network.
references:
    - https://sshole.events.greynoise.io/
    - https://bleepingcomputer.com/news/security/hackers-exploit-sshole-openssh-flaw-to-breach-linux-systems
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.command-and-control
    - attack.t1572
    - cve.2026-123158
logsource:
    product: linux
    category: process_creation
detection:
    selection_img:
        Image|endswith: '/sshd'
    selection_cli_forwarding:
        CommandLine|contains:
            - 'AllowTcpForwarding=yes'
            - 'AllowTcpForwarding=all'
            - 'GatewayPorts=yes'
            - 'PermitTunnel=yes'
    selection_cli_port:
        CommandLine|contains: ' -p '
    selection_parent_shell:
        ParentImage|endswith:
            - '/sh'
            - '/ash'
            - '/bash'
            - '/dash'
            - '/zsh'
            - '/busybox'
            - '/doas'
            - '/sudo'
    condition: selection_img and (selection_cli_forwarding or (selection_cli_port and selection_parent_shell))
falsepositives:
    - Container images whose entrypoint script starts sshd on a custom port without exec (for example SSH or SFTP images listening on 2222)
    - Admins testing a new sshd configuration on a spare port
level: high

View on GitHub

False positives and tuning: SSH and SFTP container images that start sshd from an entrypoint script on port 2222 without exec will match the second branch. Exclude them by image or host. An admin testing a config on a spare port also fires it, which is worth a question anyway. Pair it with a check for new listeners (ss -ltnp or flow logs) if you have them.

How to test: doas /usr/sbin/sshd -t -p 2222 -o AllowTcpForwarding=yes. The -t flag only tests the config and exits, so no listener starts.

4. OpenRC init script copied from a temp directory or service enabled with rc-update

Context: TAC Agent has no persistence of its own, so the attacker copied /tmp/tac-agent.init to /etc/init.d/tac-agent and ran rc-update add tac-agent default. Rule 2 catches that by name. This rule catches the same move with any name.

Condition: alert when cp, mv, install or ln copies something from /tmp, /var/tmp or /dev/shm into /etc/init.d, or when rc-update add enables a service. On Alpine, cp and mv are busybox applets, so the process image is /bin/busybox. That’s why the rule matches the tool name at the start of the command line instead of the image path.

ATT&CK: Persistence (TA0003) – T1543 Create or Modify System Process. ATT&CK has a sub-technique for systemd but none for OpenRC, so I used the parent.

title: OpenRC Init Script Copied From Temp Directory Or Service Enabled With rc-update
id: f358579a-ccfb-4819-bccf-3754deec45d0
status: experimental
description: |
    Detects an init script being copied or moved from /tmp, /var/tmp or /dev/shm into /etc/init.d, or a service being
    added to an OpenRC runlevel with rc-update. After sshole (CVE-2026-123158) exploitation on Alpine, GreyNoise
    observed an attacker install a C2 agent as an OpenRC service this way.
references:
    - https://sshole.events.greynoise.io/
    - https://bleepingcomputer.com/news/security/hackers-exploit-sshole-openssh-flaw-to-breach-linux-systems
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.persistence
    - attack.t1543
logsource:
    product: linux
    category: process_creation
detection:
    # busybox applets (cp, mv) resolve Image to /bin/busybox on Alpine, so match argv[0] in the command line
    selection_copy_tool:
        CommandLine|re: '^(\S*/)?(cp|mv|install|ln)\s'
    selection_copy_src:
        CommandLine|contains:
            - '/tmp/'
            - '/var/tmp/'
            - '/dev/shm/'
    selection_copy_dst:
        CommandLine|contains: '/etc/init.d/'
    selection_rcupdate_img:
        Image|endswith: '/rc-update'
    selection_rcupdate_cli:
        CommandLine|contains: ' add '
    condition: all of selection_copy_* or all of selection_rcupdate_*
falsepositives:
    - Provisioning and configuration management runs (Ansible, cloud-init, image build scripts) that enable services with rc-update
    - Admins installing a hand-written service script
level: medium

View on GitHub

False positives and tuning: rc-update add is routine during provisioning (cloud-init, Ansible, image builds). Exclude your config-management parent processes, or drop the rc-update branch on hosts where it’s noisy and keep the temp-to-init.d copy, which should be rare everywhere.

How to test: write a stub script to /tmp/nstest.init, then doas cp /tmp/nstest.init /etc/init.d/nstest and doas rc-update add nstest default. Clean up with rc-update del nstest and remove the file.

5. Non-interactive doas execution on Alpine host (hunting)

Context: the alpine user on Alpine’s cloud images has passwordless doas. GreyNoise saw the attacker check that with doas -n id and then run every root step through doas -n. The -n flag tells doas to fail instead of prompting, which is what a script does, not a person at a keyboard.

Condition: report every doas process with -n on its command line.

ATT&CK: Privilege Escalation (TA0004) – T1548.003 Sudo and Sudo Caching (doas is OpenBSD’s sudo equivalent).

title: Non-Interactive Doas Execution On Alpine Host
id: bd55c2aa-598d-4d2d-9d73-0bab7c3f55f8
status: experimental
description: |
    Hunts for doas run with -n (non-interactive, fail instead of prompting). After sshole (CVE-2026-123158)
    exploitation of the Alpine cloud-image "alpine" user, which has passwordless doas, GreyNoise observed the attacker
    probe with "doas -n id" and then run every root step through "doas -n".
references:
    - https://sshole.events.greynoise.io/
    - https://alpinelinux.org/posts/2026-11-05-openssh-password-authentication-bypass/
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.privilege-escalation
    - attack.t1548.003
    - detection.threat-hunting
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        Image|endswith: '/doas'
        CommandLine|contains: ' -n '
    condition: selection
falsepositives:
    - Automation and monitoring scripts that call doas -n by design
    - Configuration management agents running privileged steps over SSH
level: low

View on GitHub

False positives and tuning: automation and monitoring scripts use doas -n on purpose. Treat this as a hunting query: baseline which users and parents run it, then look at the rest, especially within an hour of a hit on rule 1.

How to test: doas -n id.

Coverage and gaps

Step in caseTacticTechniqueRuleCovered?
Overlong password to sshdInitial Access (TA0001)T1190–Gap: sshd doesn’t log password length
Password login to a * accountInitial Access (TA0001)T1190, T1078.0031Yes for root and alpine; other accounts need the lookup
Recon (id, uname, os-release, ps)Discovery (TA0007)T1082–Gap: too common alone; correlate with rule 1
Cloud metadata queryCredential Access (TA0006)T1552.005–Gap: needs network or eBPF telemetry
doas -n escalationPrivilege Escalation (TA0004)T1548.0035Hunting
Python runtime and TAC AgentExecution (TA0002)T1059.0062Yes (IOC)
C2 domain pinned in /etc/hostsCommand and Control (TA0011)T1071.0012Yes on command line; DNS is a gap
Second sshd on 2222 with forwardingCommand and Control (TA0011)T15723Yes
OpenRC servicePersistence (TA0003)T15432, 4Yes
authorized_keys changePersistence (TA0003)T1098.004–Gap: needs file monitoring
Reading password hashesCredential Access (TA0006)T1003.008–Gap: needs file-read auditing
Internal port probing with nc -zDiscovery (TA0007)T1046–Gap here; generic netcat rules may cover it

The biggest gap is the exploit attempt itself. Without a debug-level sshd log or an sshd patch that logs password length, nothing records the 257-byte password. The second gap is file activity: authorized_keys edits and reads of /etc/shadow need auditd watches (-w /etc/shadow -p r, -w /root/.ssh/ -p wa) or file-integrity monitoring, and SigmaHQ already has generic auditd rules for both that are worth loading alongside these. The third is the embedded long tail: a Yocto appliance with no agent and no remote syslog gives you nothing at all, which is one more reason to turn password authentication off there.

Deploying the rules

Clone or download the YAML from the repo and convert it with sigma-cli for your SIEM, for example:

sigma convert -t splunk --without-pipeline lnx_sshd_cve_2026_123158_password_login_star_account.yml
sigma convert -t lucene --without-pipeline proc_creation_lnx_sshd_rogue_listener_forwarding.yml
sigma convert -t kusto -p microsoft_xdr proc_creation_lnx_cve_2026_123158_tac_agent_activity.yml

Two things to watch. The sshd rule is a keyword rule, so it converts to a free-text search: point it at the index or data stream that holds your syslog. The process-creation rules use Sysmon-style field names (Image, CommandLine, ParentImage), and most backends have no ready-made Linux pipeline for auditd or Falco data, so check the converted query and map the fields yourself (in ECS, for example, process.executable, process.command_line and process.parent.executable). Run all five in alert-only mode for a week before anything pages a human.

My take

sshole is easy to detect and hard to detect at the same time. The login line is a gift: a password login to a passwordless account is about as clean a signal as you get, and it works on any host that ships its syslog. But that’s the problem. Alpine keeps its log local by default, and the embedded devices most likely to stay vulnerable for years have neither log forwarding nor an agent. If I had to pick one thing to switch on today, it’s rule 1 across every Alpine host, plus remote syslog on the boxes that don’t have it yet.

The post-exploitation rules matter more than they look. Attackers will keep getting in through other doors, and a second sshd with forwarding or a service script copied out of /tmp is a bad sign whatever the entry point was. The TAC Agent rule will go stale quickly; the behaviour rules won’t.

What I’d like from OpenSSH is one log line. sshd already knows when a submitted password is absurdly long or when the stored hash is shorter than any real hash (that’s exactly what the fix checks). Logging that at the default level would have turned this bug from invisible into the easiest exploit attempt to spot all year.

Sources

sshole: OpenSSH on Alpine and musl accepts any long password for locked accounts

sshole: OpenSSH on Alpine and musl accepts any long password for locked accounts

Every Unix admin learns the same rule early: put a * in an account’s password field and nobody can ever log in to it with a password, because no password hashes to *. On Alpine Linux and other musl-based systems running OpenSSH without PAM, that rule quietly stopped being true. Send a password longer than 256 bytes, and the C library’s crypt() fails, returns * as its error value, and sshd compares that to the stored *. Match. You’re in.

The researcher who found it, Özgün Kültekin of Wakefield, calls it “sshole”. It was fixed in portable OpenSSH 10.6p2 on November 5, 2026, is tracked as CVE-2026-123158, and CISA added it to the Known Exploited Vulnerabilities (KEV) catalog on November 9 (I checked both NVD and CISA directly). The exposure is narrow, but where it applies it’s an unauthenticated remote login, and the patch does nothing until you restart sshd.

Severity: high. Rare configuration, trivial exploit, exploited in the wild, and a long tail of embedded boxes that will never see the fix.

At a glance

  • CVE: CVE-2026-123158 (confirmed in NVD, published November 5, 2026; CNA is MITRE). Weakness: CWE-394, unexpected status code or return value.
  • CVSS 3.1: 8.1 High from the CVE record (AC:H). Red Hat’s preliminary score is 9.8 Critical (AC:L). NVD has not published its own score.
  • Affected: sshd before 10.6p2 on Linux, linked against musl libc, running without PAM, with password authentication enabled. Alpine’s default openssh-server package fits. So can OpenWrt, postmarketOS, Void (musl), Chimera and musl-based Buildroot or Yocto builds.
  • Not affected: glibc distributions (Debian, Ubuntu, Fedora, RHEL), OpenSSH with PAM, Dropbear, OpenBSD, FreeBSD, macOS.
  • Exploitation: confirmed in CISA KEV (added November 9, 2026, federal due date November 12). Previdian (on a honeypot) and GreyNoise report successful attacks.
  • Fix: OpenSSH 10.6p2 or your distribution’s patched package, then restart sshd. Workaround: PasswordAuthentication no.
  • Who should care: anyone running Alpine VMs or cloud images with SSH open, sshd-in-a-container images built on Alpine, and anyone shipping or operating embedded Linux on musl.

What we know

According to Wakefield, Kültekin found the bug on November 3, 2026 and reported it privately to the OpenSSH team, which had a patch back in under an hour. Alpine and musl maintainers were told on November 4. On November 5, Damien Miller announced OpenSSH 10.6p2 on oss-security, Alpine published fixed packages for every branch back to 3.16, and the research went public.

The OpenSSH maintainers were careful about blame. The fix commit says they “do not consider the root cause to be within OpenSSH,” but sshd is where it gets exploited, so that’s where they stopped it.

Then it moved fast. GreyNoise puts the first public exploit on GitHub at 13:16 UTC on November 5, about four hours after the release. On November 6, Help Net Security reported that threat intel firm Previdian saw its first attempt “less than nine hours after CVE publication”: eight attempts from one Japan-based IP that got root on an Alpine honeypot and ran id, uname and hostname over non-interactive SSH. GreyNoise dates the first successful exploitation it observed to 00:46 UTC on November 7. CISA’s KEV entry followed on November 9.

Timeline from November 3 to November 9, 2026: private report, maintainers notified, OpenSSH 10.6p2 release, first public exploit and CVE publication, first successful exploitation, CISA KEV listing.
Six days from private report to CISA KEV. Times in UTC from GreyNoise; earlier dates from Wakefield.

How it works

I like this bug because nobody wrote it. It came from three reasonable decisions in three projects, years apart, as the researcher’s write-up lays out.

First, musl in August 2012. POSIX lets crypt() return NULL on failure, and plenty of callers never check, so they crash. musl chose to return the string * on failure instead, which is safe as long as nobody’s stored hash is *. A few weeks later musl added SHA-256 and SHA-512 crypt with a 256-byte key cap (KEY_MAX) to stop denial-of-service with huge inputs. Anything longer fails, and failure now means *.

Second, OpenSSH in July 2016 (7.3p1). To close a timing side channel that let attackers enumerate users (CVE-2016-6210 is cited), sshd started choosing a realistic salt for accounts without a usable hash, so their failed logins cost the same as real ones. All the advisories require a local account with a $5$ or $6$ hash (SHA-256 or SHA-512 crypt). My reading, which the write-ups imply but don’t spell out, is that this hash supplies the salt that sends the attacker’s password into musl’s capped SHA-crypt code.

Third, Alpine in 2022. After CVE-2019-5021 (Docker images that shipped root with no password), Alpine had set root’s field to !. In 3.16 it changed root to * so SSH key logins kept working without PAM. Key-only users, directory users via musl-nscd and the alpine user on tiny-cloud images also carry *.

Put those together: the attacker sends a 257 to 1,024 byte password for a * account, crypt() fails and returns *, and the comparison against the stored field succeeds. The bug class is the interesting part. An error value that can also be a valid result is the same mistake as in-band signalling, and CWE-394 is the right label for it. The fix is just as blunt: sshd now refuses to compare against any stored hash shorter than four characters (MIN_PASSWORD_HASH_LEN).

Four-step diagram: attacker targets an account whose password field is a star, sends a 257 to 1024 byte password, musl crypt() fails and returns a star, sshd compares star to star and accepts the login.
The bypass in four steps: musl's error value matches the locked-account marker.

The sources disagree on small details. The CVE text says 256 to 1024 characters; Alpine and Wakefield say 257 to 1,024 bytes. Alpine describes a login “in one connection, every time,” while the researcher’s write-up and a Medcrypt follow-up on oss-security (November 9) say a prior failed attempt may be needed. For defenders that changes nothing.

Who is affected and how badly

Every condition has to hold: musl, no PAM, password authentication on, a * account, and a real SHA-crypt hash somewhere. That sounds like a long list, but on Alpine it’s mostly defaults. PasswordAuthentication yes is OpenSSH’s default, root ships as root:*, and the stock openssh-server package has no PAM. The usual missing piece is the $6$ hash, and one passwd run by a human is enough to add it.

Root itself is protected by the default PermitRootLogin prohibit-password. Other * accounts that can escalate are not. The clearest case is Alpine’s official cloud images (qcow2, VHD and AMI from 3.18.11 through 3.24.3), which ship an alpine user with a * password and passwordless doas. Alpine says they’re safe on first boot and become exploitable once any $6$ hash exists, for example a console password or hashed_passwd in cloud-init user-data. Images built from the fixed point releases (3.21.10, 3.22.8, 3.23.8, 3.24.4) include the fix, but instances you already launched don’t get it.

Containers are a split case. Alpine says plainly that containers that don’t run sshd aren’t affected, and that’s most of them. The ones that do are images whose whole job is SSH: bastion containers, SFTP drop boxes, CI and lab images, things like panubo/docker-sshd, where a user opened an upgrade request on November 7. Any such image that bakes in a password user supplies the hash, and none of them patch themselves. Somebody has to rebuild and redeploy.

Then there’s embedded. Medcrypt reproduced it on a stock Yocto image with no unusual configuration, and flagged musl, no PAM, passwords on and locked service accounts as a common embedded baseline. Dropbear is not affected, so only builds that ship OpenSSH are in scope. I have no source for how many vulnerable hosts are internet-reachable, and I won’t guess. GreyNoise suggests attacks are still rare: as of November 14, 14:41 UTC, it lists 44 confirmed post-exploitation chains from 10 attacker IPs in 7 countries, against tens of millions of ordinary SSH connections. Some of the page’s totals don’t reconcile, so treat them as rough.

Two-column checklist. Left: six conditions that must all hold for exposure (musl, no PAM, password auth on, a star account, a SHA-crypt hash, unpatched or unrestarted sshd). Right: configurations not affected.
Exposure checklist, based on the Alpine advisory and Wakefield research.

What to do now

  1. Find musl sshd. On each host or image, ldd "$(command -v sshd)" | grep -i musl tells you the libc. On Alpine, apk info -e openssh-server-pam tells you whether the PAM build is installed. Remember that the PAM build is only safe with UsePAM yes.
  2. Check the effective config, not the file: sshd -T | grep -i passwordauthentication. Match blocks and drop-ins can turn it back on.
  3. Upgrade. Alpine’s fixed openssh versions: edge 10.6_p2-r0, 3.24 10.3_p1-r2, 3.23 10.2_p1-r1, 3.22 10.0_p1-r11, 3.21 9.9_p2-r1, 3.20 9.7_p1-r6, 3.19 9.6_p1-r3, 3.18 9.3_p2-r4, 3.17 9.1_p1-r7, 3.16 9.0_p1-r6. For your own builds, Wakefield says the upstream patch applies to every release from 7.3p1 onward.
  4. Restart sshd: rc-service sshd restart on OpenRC. Alpine is explicit that upgrading does not restart the running daemon, so the old code keeps accepting the long password. A quick way to find the stragglers (my suggestion, not Alpine’s) is to check whether the listener’s /proc/<pid>/exe points at a deleted file, or whether its start time is older than the package install.
  5. If you can’t patch tonight, turn passwords off. Alpine’s recipe is a drop-in at /etc/ssh/sshd_config.d/00-no-passwords.conf with PasswordAuthentication no (the drop-in directory is read from 3.19 onward), then sshd -t and a restart. Confirm key login works first and keep your current session open.
  6. Rebuild SSH-bearing container images from a fixed base and redeploy them. Pulling a new tag does nothing to containers that are already running.
  7. Turn any * account that should be unusable into !, which Alpine lists as not affected. Get rid of PermitRootLogin yes where you can.

Detection and monitoring

sshd doesn’t log password contents or length, and the traffic is encrypted, so the overlong password itself is invisible. What you can see is the result and what attackers did next. I wrote five Sigma rules on two kinds of telemetry: the sshd log, which every host has, and process creation (auditd, Falco, Tetragon or an EDR), which many Alpine servers and nearly all embedded devices don’t. The post-exploitation rules are built on what GreyNoise captured on compromised Alpine hosts on November 7 and 8, 2026: a doas -n probe, a Python C2 agent called TAC Agent, a second sshd on port 2222 with TCP forwarding, and an OpenRC service for persistence.

RuleCategoryLog sourceATT&CKLevel
Password login to root or alpineEmerging threatlinux / sshdT1190, T1078.003High
TAC Agent implant activityEmerging threatlinux / process_creationT1059.006, T1071.001, T1543High
Extra sshd listener with forwardingGeneric TTPlinux / process_creationT1572High
OpenRC script from /tmp or rc-update addGeneric TTPlinux / process_creationT1543Medium
Non-interactive doasHuntinglinux / process_creationT1548.003Low

The one to turn on today is the first. Alpine ships root and the cloud-image alpine user with * in /etc/shadow, so neither has a password, and a password login to either is the signal Wakefield and Alpine both point to. Scope it to your Alpine and musl hosts, because on glibc distributions a root password login can be legitimate. Other * accounts (key-only users, musl-nscd directory users) need a per-host lookup, which I cover in the companion post.

title: Potential CVE-2026-123158 Exploitation - SSH Password Login To Root Or Alpine Account
id: 2e635140-37d2-48cd-913d-ee473f0b36f9
status: test
description: |
    Detects a successful sshd password login for the "root" or "alpine" account. On Alpine Linux both ship with "*"
    in /etc/shadow and have no password, so on a musl-based sshd without PAM a password login to them is the main
    sign of sshole (CVE-2026-123158) exploitation. Scope this rule to Alpine and other musl hosts.
references:
    - https://alpinelinux.org/posts/2026-11-05-openssh-password-authentication-bypass/
    - https://wakefield.co/research/openssh-musl-authentication-bypass
    - https://nvd.nist.gov/vuln/detail/CVE-2026-123158
    - https://netsec101.com/?p=242
author: netsec101.com
date: 2026-11-15
tags:
    - attack.initial-access
    - attack.t1190
    - attack.t1078.003
    - cve.2026-123158
    - detection.emerging-threats
logsource:
    product: linux
    service: sshd
detection:
    keywords:
        - 'Accepted password for root from'
        - 'Accepted password for alpine from'
    condition: keywords
falsepositives:
    - Hosts where an admin set a real root password and enabled PermitRootLogin yes (common on glibc distributions, rare on Alpine)
    - Alpine hosts where the alpine user was deliberately given a password
level: high

If it fires, treat the box as compromised and check doas use, new users, new files, /etc/hosts, /etc/init.d and authorized_keys. For monitoring, retro-hunt sshd logs back to November 5, 2026, 09:00 UTC, when the bug went public. On Alpine the log is /var/log/messages, written by busybox syslogd, which keeps it local and rotates it small, so if you don’t forward logs, collect them now before they roll over. Keep the first rule running after patching: a hit later means an sshd somewhere that was never upgraded or never restarted. The attacker IPs from Previdian and GreyNoise are for retro-hunts only; GreyNoise warns that some belong to compromised legitimate hosts, and they will age fast.

I wrote up all five rules, with tuning notes, a host-level check and ATT&CK coverage, in a separate detection post. The YAML lives in my Detection Rules repo.

My take

Is this overhyped? For most fleets, a bit. If you run glibc distributions with PAM, you can stop reading. Even on Alpine, root stays safe by default, and the realistic path in needs a second account. The 8.1 score is closer to the truth than 9.8, because the prerequisites are real.

Where it’s underrated is the long tail. Alpine servers will get patched this week by people who read advisories. Yocto and Buildroot appliances with OpenSSH, musl and a locked service account will sit on networks for years, and I expect many of their vendors never to ship a fix. If you build embedded Linux, don’t stop at bumping OpenSSH. Look for every place your stack treats a magic string as “impossible”.

The broader lesson is about sentinel values. musl’s choice to return * was defensive, meant to stop crashes in careless callers. It became a hole because it matched another convention for “no password”. Nobody owned that interaction, so the flaw sat between three codebases from 2016 to 2026. What I’d do first: a fleet-wide sshd -T sweep for passwordauthentication yes, tonight. On boxes that only ever use keys, password auth shouldn’t be on at all.

Sources