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/douglasmun/cve-2026-123158_sshole_lab
Container SecurityVulnerability AnalysisExploitationAuthenticationPapers & ResearchLearning & EducationLabs & Practice
GitHub
Share
douglasmun/cve-2026-123158_sshole_lab

CVE-2026-123158_sshole_lab

Secure-coding laboratory: Docker reproduction of CVE-2026-123158 (sshole) — OpenSSH password-auth bypass on musl/no-PAM, why the default is safe, and the fix

View Repository
7 days agoNot yet reviewed

CVE-2026-123158_sshole_lab — a secure-coding laboratory

A self-contained, Docker-isolated reproduction of CVE-2026-123158 ("sshole"): an OpenSSH password-authentication bypass that affects musl-based systems (Alpine, OpenWrt, Buildroot, Yocto) where sshd is built without PAM. On a vulnerable host, an account whose /etc/shadow hash field is * can be logged into with any password of 257 bytes or longer.

The cause is a three-way collision: musl's crypt(3) returns the string "*" to signal "key too long", a locked account stores "*", and OpenSSH authenticates with strcmp(crypt(...), stored). So strcmp("*", "*") == 0 — an error signal is accepted as a valid credential.

This repo proves the bypass end to end, shows why it only "affects some configurations", and proves the official fix rejects it — all on an isolated Docker network, against accounts and hosts you control.

Safety and intended use

This is defensive security education. Everything runs in throwaway Docker containers on a private network (sshole-net) against a victim account created solely for the demo. Nothing reaches, scans, or authenticates to any system you do not own. Do not point the PoC client (repro/exploit.sh) at a host you are not authorised to test — that is the only part that could be misused, and it needs a target you supply.

Prerequisites

  • Docker (tested on 29.x) with permission to build images and create networks
  • make
  • No host toolchain needed — every C file compiles inside Alpine containers against musl, because the bug is musl-specific and does not reproduce under glibc.

Quick start

make core      # the vulnerability in ~50 lines, no network: shows the BYPASS
make pwn       # full live network shell against a vulnerable sshd: shows PWNED
make patched   # the official fix rejecting the identical attack
make clean     # remove all containers and the Docker network

make core is the fastest way to see the collision; it builds and runs repro/replica.c and needs no sshd. make pwn is the full remote proof.

What each target shows

make targetWhat it demonstratesResult
corethe crypt/strcmp collision in isolation (replica.c)BYPASS
pwnfull live network shell, warm pick_salt cache (Dockerfile.warm)PWNED
vuln-coldcold cache: the primitive fires but a musl buffer clobber blocks the matchrejected
spylive crypt()/strcmp() trace inside real sshd (cryptspy.c via LD_PRELOAD)trace
authsimthe pick_salt() buffer clobber against the real /etc/shadow (authsim.c)rejected
shadowtestthe victim's effective stored hash resolves to "*" (shadowtest.c)prints "*"
patchedthe fix (MIN_PASSWORD_HASH_LEN) rejecting the attack (Dockerfile)rejected
cleantear down containers and the network—

vuln-cold and pwn are the instructive pair: the same from-source OpenSSH 9.7p1, differing only in whether pick_salt()'s salt cache is warm when the privsep monitor forks. Cold, a musl shared-buffer overwrite clobbers the stored "*" and the login is rejected; warm, the "*" survives and the shell drops. That fragility is why the advisory says the bug "affects some configurations".

Where to read the detail

  • WRITEUP.md — the full technical report: the three-way collision, the exact pre-patch code path, the measured musl length boundary, reproduction output, a side-by-side secure-coding lesson (flawed vs. fixed), and a triage checklist for real hosts.
  • DEFAULT-VS-VULNERABLE.md — why a stock Alpine + OpenSSH image is not exploitable out of the box, the exact deltas (D1–D5) that make it vulnerable, and proof the patched package rejects the same attack. Read this first if you want to know whether your own hosts are exposed: a default install is on the vulnerable code path but has no vulnerable account.

Am I affected?

Vulnerable only if all hold: sshd linked against musl, built without PAM, password auth on, a login-reachable account whose shadow field is exactly * (any account, not just root; !, !!, x and empty do not collide), and OpenSSH < 10.6p2 without the backported fix. The triage commands are in WRITEUP.md §8. Fix: upgrade to OpenSSH ≥ 10.6p2 (Alpine openssh-server ≥ 9.7p1-r6), or set PasswordAuthentication no, or re-lock such accounts with ! instead of *.

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.

    668
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    496
  • 3

    ARTEX

    baarai/artex

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

    394
  • 4

    redforge

    cybersecurity91/redforge

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

    339
  • 5

    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.

    258
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    254

Explore all tools

Browse our collection of tools

View all tools →