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-lab — Lab de estudo para CVE-2026-123158 (sshole) - bypass de autenticacao SSH em sshd musl sem PAM | Kitploit
Tools/GitHubGitHub/kaiqui/cve-2026-123158-lab
Vulnerability AnalysisExploitationNetwork SecurityPenetration TestingAuthenticationLearning & EducationCurated ResourcesLabs & Practice
GitHubkaiqui/cve-2026-123158-lab

cve-2026-123158-lab

Lab de estudo para CVE-2026-123158 (sshole) - bypass de autenticacao SSH em sshd musl sem PAM

View Repository
8 days agoNot yet reviewed
Share

CVE-2026-123158 ("sshole") — Study lab

Local, Docker-reproducible lab to study CVE-2026-123158 — a real password authentication bypass vulnerability in OpenSSH, disclosed on November 5, 2026, and fixed the same day by the OpenSSH project (version 10.6p2).

⚠️ Warning. The vulnerability is real. This repository exists only for controlled reproduction in a local, isolated environment. Never run the exploit included here against third-party systems without explicit authorization.

What CVE-2026-123158 is

  • Root cause: on Linux systems using the musl libc (e.g., Alpine) with sshd running without PAM, a password between 257 and 1024 bytes causes musl's crypt() function to fail internally and return, on error, the input string itself — which may coincide with the * character stored in the password field of a "key-only" account in /etc/shadow. sshd then compares * with *, concludes (wrongly) that the password matched, and accepts the login.
  • CVSS 3.1: 8.1 (High) — AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
  • CWE: CWE-394 (inadequate handling of error return value).
  • Fixed in: OpenSSH 10.6p2 / Alpine openssh-server 10.0_p1-r11.
  • Does not affect: systems with glibc, or any Linux whose sshd delegates password authentication to PAM.

Conditions required for exploitation (all simultaneous): musl libc, sshd without PAM, PasswordAuthentication yes (factory default), a target account with a * password field, and a second account in the same /etc/shadow with a valid $5$/$6$ hash (the "salt donor").

Repository structure

Dockerfile          # build multi-stage: sshd vulnerável (compilado sem PAM) vs. pacote Alpine corrigido
docker-compose.yml   # dois serviços: app-vulnerable (porta 2222/8000) e app-patched (2223/8001)
entrypoint.sh        # monta as contas de teste (deploy, salted) e sobe sshd + app
app/                 # serviço FastAPI mínimo, sem vulnerabilidade própria — só "vítima colateral"
exploit/sshole.py    # PoC em Python/Paramiko: autentica por senha longa, sem chave nem senha real
keys/                # fica vazio no repo; veja "Como rodar" para gerar seu par de chaves

How to run

1. Generate the operator key pair

entrypoint.sh installs a legitimate public key for the deploy account (representing the correct access path, by key). Generate your own pair locally — it is never used by the exploit, it only serves to demonstrate the "normal" scenario:

ssh-keygen -t ed25519 -N "" -C "deploy-operator-lab" -f keys/deploy_ed25519

2. Start the containers

docker compose up --build -d

This brings up:

  • sshole-vuln — OpenSSH 9.9p1 compiled from source with --without-pam, on Alpine/musl. SSH on localhost:2222, HTTP on localhost:8000.
  • sshole-patched — current Alpine openssh-server package (already patched). SSH on localhost:2223, HTTP on localhost:8001.

3. Run the exploit

pip install -r exploit/requirements.txt   # paramiko
python3 exploit/sshole.py --host localhost --port 2222 --user deploy

Expected result against the vulnerable one: rejection on the 1st attempt, authentication on the 2nd, shell as deploy without ever having had the private key.

Repeat against port 2223 (sshole-patched) to confirm that the same technique fails on all attempts.

Mitigation

  • Primary fix: update OpenSSH to 10.6p2+ (apk upgrade on Alpine).
  • Immediate mitigation: PasswordAuthentication no in sshd_config, or disable SSH until you update.
  • Never rely on * alone as protection for a "key-only" account without also disabling password authentication on the server.
  • In the cloud (e.g., GCP): prefer OS Login/IAM, Identity-Aware Proxy, a restrictive VPC firewall, and service accounts with least privilege — none of these layers replaces the fix, but they reduce the blast radius if something slips through.

Sources

  • OpenSSH project advisory (10.6p2 release).
  • Red Hat — CVE-2026-123158
  • ox.security — OpenSSH Password Authentication Bypass on Alpine Linux
  • Debian security tracker for CVE-2026-123158.

License / usage

Personal study material, no warranties. Educational use only, in a local and isolated environment.

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 →