Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/quaerendir/cve-2026-123158-audit
Defensive ToolsVulnerability AnalysisScripting & AutomationConfiguration AuditingNetwork SecurityAuthenticationMisconfigurationIncident ResponseLog Analysis
GitHubquaerendir/cve-2026-123158-audit

cve-2026-123158-audit

1 day agoNot yet reviewed
Share

Read-only POSIX sh audit for CVE-2026-123158: OpenSSH password authentication bypass on musl libc without PAM (Alpine Linux)

View Repository

cve-2026-123158-audit

CVE Name CVSS Disclosed Platform Shell License Version CI

Read-only audit for CVE-2026-123158 ("sshole"): an OpenSSH sshd password authentication bypass on musl libc without PAM. Alpine Linux is the main example; Yocto, OpenWrt, Void (musl) and Wolfi are in the same situation.

Written in POSIX sh, so it runs as is on Alpine's busybox ash (no apk add bash), on dash and on bash. It never runs an exploit and never prints a password hash.

It also prints a short basic SSH hardening report (empty-password accounts, root login, weak algorithms, file permissions). That section is informational and never changes the CVE verdict or the exit code.

The bug

sshd without PAM checks a password with crypt() and compares the result with the shadow password field. musl's crypt() returns * as its error value for keys longer than 256 bytes, and * is exactly what an account with no password stores. When the stored field is too short to carry a salt, sshd borrows the salt of another account, the computed value equals the stored *, and the login succeeds. On affected setups any password of 257 to 1024 bytes works for such an account. Fixed upstream in OpenSSH 10.6p2.

All of these must hold (Alpine advisory, 2026-11-05)

#PreconditionTypical case
1sshd without PAMopenssh-server, or openssh-server-pam with UsePAM no (the Alpine default)
2PasswordAuthentication yesthe OpenSSH default
3an account with * as password fieldroot on Alpine 3.16+, key-only users, the alpine user of tiny-cloud images
4an account with a $... hashan admin set a password for someone
5the SSH port is reachable

Not affected: containers without sshd, PasswordAuthentication no, UsePAM yes with a PAM build, systems where no account has a $ hash.

Usage

# review it first, then run as root (sshd -T and /etc/shadow need root)
wget -O cve-2026-123158-audit.sh https://raw.githubusercontent.com/Quaerendir/cve-2026-123158-audit/main/cve-2026-123158-audit.sh
less cve-2026-123158-audit.sh
sh cve-2026-123158-audit.sh              # text report
sh cve-2026-123158-audit.sh --json       # JSON on stdout
sh cve-2026-123158-audit.sh --quiet      # only the verdict word, plus the exit code
sh cve-2026-123158-audit.sh --no-hunt    # skip the log grep
sh cve-2026-123158-audit.sh --no-banner  # text report without the ASCII banner
sh cve-2026-123158-audit.sh --version

Without root the result is UNKNOWN unless the package is already fixed and the daemon is current.

Exit codes and verdicts

exitverdictmeaning
0PATCHEDfixed package and a daemon that runs it
0NOT_APPLICABLEnot a musl system, or no sshd installed or running
1MITIGATEDunfixed code, but no reachable entry path right now. Still patch
2VULNERABLEexposed, or indicators of exploitation found in the logs
3UNKNOWNcannot decide (not root, odd package version). Treat as suspect
4usage error or missing basic tools

Same scheme as the other audits in this family (cve-2026-99999-audit and others): 0 clear, 1 mitigated, 2 vulnerable, 3 unknown, 4 error.

Basic SSH hardening checks (informational)

Read from the effective sshd -T output and a few file modes. Each line is [FAIL], [WARN] or [ ok ], with a summary count. They do not change the verdict or the exit code, so scripts that rely on exit codes 0 to 4 behave as before. In --json they appear as hardening_fail, hardening_warn and a hardening array of "LEVEL: text" strings; empty_password_account_names lists the accounts.

CheckLevel
PermitRootLogin yesFAIL
PermitEmptyPasswords yesFAIL
accounts with an empty password field, listed by nameFAIL if PermitEmptyPasswords yes (reachable over SSH), otherwise WARN (usable at a console or with su)
StrictModes no, PermitUserEnvironment yes, HostbasedAuthentication yesFAIL
host private key readable by group or otherFAIL
/etc/ssh/sshd_config writable by group or other, or (on a real root) not owned by rootFAIL
PasswordAuthentication yesWARN
KbdInteractiveAuthentication yes together with UsePAM yesWARN
MaxAuthTries above 6WARN
X11Forwarding yesWARN
weak ciphers (CBC, arcfour, blowfish, cast128), MACs (MD5, SHA-1, umac-64), key exchange (SHA-1), SHA-1 or DSA host and user key algorithmsWARN, with the entries named

Note that OpenSSH's default MAC list still contains hmac-sha1 and umac-64, so a stock Alpine install reports weak MACs. That is real, but a common and low-severity finding.

Not covered: Match blocks (global values only), AllowUsers/AllowGroups, crypto policy beyond the weak-entry patterns, authorized_keys contents, SSH exposure and firewalling.

Fix

apk upgrade -U -a
rc-service sshd restart        # the upgrade does NOT replace the running daemon

Fixed openssh builds (from OSV ALPINE-CVE-2026-123158):

Alpinefixed buildAlpinefixed build
edge10.6_p2-r03.199.6_p1-r3
3.2410.3_p1-r23.189.3_p2-r4
3.2310.2_p1-r13.179.1_p1-r7
3.2210.0_p1-r113.169.0_p1-r6
3.219.9_p2-r13.209.7_p1-r6

If you cannot update now, set PasswordAuthentication no (check with sshd -T | grep -i passwordauthentication) and test key login in a second session before closing the first.

How the verdict is decided

  • Package. On Alpine the owner of the running sshd binary is asked from apk, and its version is compared with the fixed build of its own upstream series (so a package from another branch is judged correctly). sshd -V is deliberately not used on Alpine: fixes are backported, and 10.0_p1-r11 still prints OpenSSH_10.0p2. A series that is not in the table is UNKNOWN, one older than any fixed release (before 9.0) is unfixed.
  • Other musl hosts. Only the upstream version from sshd -V can be used. 10.6p2 or newer is PATCHED. Anything lower cannot be proven unfixed, because a distribution may have backported the fix, and the report says so.
  • Restart. If the package is fixed but /proc/PID/exe points to a deleted file, the daemon still runs the old code, and the host is judged as unfixed.
  • PAM. sshd -T prints no usepam key when the build has no PAM. With a PAM build, UsePAM yes is a mitigation, UsePAM no is not.
  • Accounts. Field types in /etc/shadow: *, $..., !, empty. Only the names of * accounts are shown, never hashes.
  • Log hunt. Accepted password for <account with *> in /var/log/messages, auth.log, secure or syslog. An account with no password cannot log in with a password legitimately, so a hit means exploitation. It forces VULNERABLE even on a patched host, because that host needs incident response, not just a patch.

Limitations and open questions

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    336
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools →