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
CVE-2026-123158 — OpenSSH + musl password authentication bypass (sshole) checker: local precondition audit + remote verification; for authorized testing | Kitploit
Tools/GitHubGitHub/hackspeak/cve-2026-123158
Web Vulnerability ScannersVulnerability AnalysisExploitationConfiguration AuditingNetwork SecurityPenetration TestingAuthentication
GitHubhackspeak/cve-2026-123158

CVE-2026-123158

OpenSSH + musl password authentication bypass (sshole) checker: local precondition audit + remote verification; for authorized testing

View Repository
1114 days agoNot yet reviewed

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 →
Share

CVE-2026-123158 (OpenSSH / musl password authentication bypass) detection and verification script

Targeting CVE-2026-123158 (community name "sshole") — an OpenSSH + musl password authentication bypass: on musl systems without PAM, accounts whose password field is * (no password set) can be logged into with a password of any length from 257 to 1024 bytes.

ID: CVE-2026-123158 (CVSS 3.1 8.1); OpenSSH has already fixed it in 10.6p2 (2026-11-05) as a "critical security bypass (workaround)".

This repository provides a Python script for:

  1. Local health check: check whether the machine falls into the affected profile according to four preconditions (reads /etc/shadow);
  2. Remote verification: initiate a long-password SSH authentication against a specified account to determine whether it can be bypassed (requires paramiko).

1. Mechanism overview

In one sentence: two "never match" sentinel values collided in the same string comparison forty years later.

TimeEvent
1980Unix used * to mean "this account has no password and can never log in" (first used by Bill Joy for the daemon account in 3BSD), stored in /etc/passwd
1997POSIX specified that crypt() returns NULL on failure; but many programs do not check for NULL
2012-08-09musl changed to returning "*" on failure (to prevent callers from crashing) — overlapping with the 1980 sentinel value
2012-08-29musl added a 256-byte upper limit to sha512crypt (to prevent DoS); overlong passwords → crypt() fails → returns "*"
2016-07OpenSSH fixed CVE-2016-6210 (username enumeration), making sshd borrow another account's salt to hash for accounts that "have no real hash"
2019 → 2022Alpine's root changed from ! to * (! would also disable SSH key login)
2026-11The two sentinels meet: the returned "*" compares equal to the stored "*" → authentication succeeds

Trigger chain (non-PAM path)

① 攻击者用超长密码(257–1024 字节)尝试登录账户 X(X 的 shadow 字段是 "*")
② sshd(无 PAM)调用 sys_auth_passwd(),拿到的 pw_password == "*"
③ "*" 不能当 salt 用 → sshd 借用另一个账户的 $5$/$6$ salt(2016 年的改动)
④ sshd 调 crypt(password, salt)
⑤ musl:密码 > 256 字节 → 拒绝 → 返回 "*"
⑥ sshd 比较:crypt 返回 "*" == 存储字段 "*" → 相同 → 登录成功

The fix (10.6p2, commit 90f9c2f7) only added one line before the comparison:

ret = encrypted_password != NULL &&
    strlen(pw_password) >= MIN_PASSWORD_HASH_LEN &&   /* MIN_PASSWORD_HASH_LEN = 4 */
    strcmp(encrypted_password, pw_password) == 0;

When the stored field is only 1 byte (*), it is directly judged as a mismatch.


2. Affected Conditions (all four must be satisfied)

  1. Running openssh-server (compiled without PAM), or openssh-server-pam but with UsePAM no;
  2. PasswordAuthentication yes (OpenSSH default);
  3. An account exists on the machine whose password field is *;
  4. At least one other account has a $5$ or $6$ hash.

Not affected: non-Linux, glibc systems, sshd using PAM, PasswordAuthentication no, accounts locked with !, machines without $-style hashes, containers not running sshd.

On Alpine, * accounts include: key-based users created with adduser without a password, usermod -p '*', directory service users via musl-nscd, and root, which the base image has shipped as root:* since 3.16 (protected by the default PermitRootLogin prohibit-password unless changed to yes; however, if that account can escalate privileges via doas, the protection is defeated).


3. Usage

# 1) 本地体检(需要 root 读 /etc/shadow)
sudo python3 ssh_star_bypass.py --local

# 2) 远程验证(需要 paramiko)
python3 -m pip install paramiko
python3 ssh_star_bypass.py -t 10.0.0.5 -u alpine
python3 ssh_star_bypass.py -t 10.0.0.5 -u alpine -l 512 -p 22

Parameters: -t/--target, -p/--port, -u/--user, -l/--length (257–1024, default 300), --timeout.

Remote mode first performs a control (a 16-byte wrong password, expected to be rejected), then sends a long password. This distinguishes "there really is a vulnerability" from "this account already has a password".

Exit codes: 0 present/exploitable; 1 not hit; 2 cannot determine (missing dependency/permission/network).


IV. Notes

  • Only musl builds without PAM trigger it; running on glibc / PAM systems will not succeed (this itself is one of the criteria for judgment);
  • A long password causes crypt() to fail directly, so there is no need to know the correct password, and no brute-forcing is needed;
  • A single connection and a single attempt are enough to succeed (it is not a probabilistic bug);
  • The script makes only one authentication attempt, does not enumerate accounts, and does not brute-force, making it convenient for minimal verification in authorized environments.

V. Remediation and Troubleshooting

Remediation

apk upgrade -U -a          # Alpine 3.21.10 / 3.22.8 / 3.23.8 / 3.24.4 起含修复包
rc-service sshd restart    # 升级不会重启运行中的 sshd,必须手动重启

Self-compile: upgrade to OpenSSH 10.6p2. If upgrading is not possible: set PasswordAuthentication no and restart sshd (first confirm key login works and keep the current session).

Troubleshooting

# 是否有"本来没密码的账户"被密码登录过
grep -E "Accepted password for" /var/log/messages

Focus on alpine, root, and the dedicated key account; also review doas usage records, recently created users, and changes to files and authorized_keys. Official recommendation: if you cannot rule out that a login occurred, treat it as compromised.


6. Disclaimer

For security research and defensive validation only in environments you own or are explicitly authorized to test. Do not use against unauthorized systems; the script will generate real authentication failure/success logs on the target.

Mechanism descriptions reference: public analysis by researcher Özgün Kültekin (Wakefield), Alpine security advisories, and the OpenSSH 10.6p2 release notes.

Download Tool