Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
sshole-alpine-cve-2026-123158 — Research and detection toolkit for CVE-2026-123158 (SSHole), an OpenSSH password authentication bypass affecting certain musl-based Linux systems with PAM disabled. Includes a Python proof of concept and a read-only Alpine Linux exposure checker. | Kitploit
Outils/GitHubGitHub/garvthakkar17/sshole-alpine-cve-2026-123158
Defensive ToolsVulnerability ScannersVulnerability AnalysisExploitationConfiguration AuditingAuthenticationLearning & Education
GitHubgarvthakkar17/sshole-alpine-cve-2026-123158

sshole-alpine-cve-2026-123158

Research and detection toolkit for CVE-2026-123158 (SSHole), an OpenSSH password authentication bypass affecting certain musl-based Linux systems with PAM disabled. Includes a Python proof of concept and a read-only Alpine Linux exposure checker.

Voir le dépôt
il y a 8 joursPas encore vérifié
Partager
Contenu non disponible dans la langue demandée. Affichage de la version anglaise.

SSHole: CVE-2026-123158

OpenSSH Password Authentication Bypass on musl-based Linux Systems

A security research and detection project exploring CVE-2026-123158, also known as SSHole.

This repository contains a Python-based proof of concept and a read-only shell checker to help security researchers and system administrators understand and assess potentially affected Alpine Linux systems.

Overview

CVE-2026-123158 is an OpenSSH password authentication bypass affecting certain Linux systems that use musl libc with PAM authentication disabled.

The vulnerability occurs because of how OpenSSH handles the return value from the crypt() function when processing specially sized passwords.

On affected musl-based systems, crypt() returns * as an error indicator when the supplied password exceeds the supported length. Since * can also appear as the stored password field for accounts without a usable password hash, the comparison can result in successful authentication.

The issue is configuration-dependent. Merely running Alpine Linux or using musl libc does not automatically make a system vulnerable.

Research objectives

This project was developed to:

  • Understand the underlying interaction between OpenSSH and musl libc.
  • Reproduce the authentication bypass in an isolated, authorized environment.
  • Develop a Python proof of concept to demonstrate the authentication behavior.
  • Create a read-only checker for identifying potentially vulnerable Alpine configurations.
  • Document the conditions required for exploitation and the potential impact across different deployment environments.

Vulnerability details

AttributeDetails
CVECVE-2026-123158
NicknameSSHole
ComponentOpenSSH
Affected environmentLinux using musl libc without PAM
Vulnerability typeAuthentication bypass
CWECWE-394, Unexpected Status Code or Return Value
Upstream fixed versionOpenSSH 10.6p2
Alpine fixed packagesRelease-specific backported packages

Conditions required for exposure

The vulnerability requires a combination of specific system and authentication configurations.

All the following conditions must be satisfied:

1. musl libc

The SSH server must run on a Linux environment using musl libc.

Alpine Linux is a prominent example.

2. PAM authentication disabled

The SSH server must use the non-PAM password authentication implementation.

On Alpine, the standard openssh-server package is built without PAM. The PAM-enabled package is also potentially affected if UsePAM no is configured.

3. Password authentication enabled

The effective SSH configuration must have:

PasswordAuthentication yes

4. Account with a * password field

At least one target account must have * as its stored password field in /etc/shadow.

For example:

labuser:*

This represents an account without a usable password hash.

5. Another account with a real password hash

At least one local account must have a $5$ or $6$ password hash.

For example:

hashuser:$6$randomsalt$hashedvalue

This allows sshd to obtain a salt while processing accounts whose stored password fields are too short.

6. Vulnerable, unpatched OpenSSH

The server must not contain the upstream fix or an equivalent distribution backport.

The Alpine package version must be checked against the fixed version for its specific release branch.

Technical explanation

When PAM is disabled, OpenSSH performs password verification using the system's crypt() implementation.

On affected musl-based systems, an overlong password causes crypt() to return:

*

This is an error indicator, not a valid password hash.

However, * is also used in the shadow database for accounts that do not have a usable password hash.

When the authentication code compares these values without correctly handling the error return, the comparison can succeed.

The result is an authentication bypass affecting accounts that would otherwise reject password-based authentication.

The underlying issue is not a conventional buffer overflow. It is an authentication logic flaw caused by incorrect handling of an unexpected return value.

Potentially affected environments

The underlying vulnerability is not exclusive to Alpine Linux.

The relevant factor is the combination of musl libc, OpenSSH, disabled PAM, and the required account configuration.

EnvironmentExposure considerations
Alpine LinuxConfirmed affected platform when all prerequisites are present
Alpine-based Docker containersRelevant when the container runs a vulnerable sshd
OpenWrtUses musl in common configurations, but many installations use Dropbear instead of OpenSSH
BuildrootDepends on the selected libc, SSH implementation, and build configuration
YoctoDepends on the selected distribution configuration and packages
Embedded Linux devicesPotential exposure where the vulnerable OpenSSH and authentication configuration are present
Standard glibc-based distributionsDo not meet the musl prerequisite

Important: These environments should not automatically be classified as vulnerable. Their actual OpenSSH implementation, libc, PAM configuration, package version, and account state must be verified.

Docker and container considerations

Alpine is commonly used as a lightweight base image for Docker containers.

However, containers that do not run an SSH server are not affected through this vulnerability.

The relevant scenarios are containers that include OpenSSH, run sshd, and satisfy the authentication prerequisites.

A minimal Alpine application container without sshd should not be classified as vulnerable merely because it uses musl libc.

Repository contents

1. Proof of Concept

Location:

poc/cve-2026-123158-poc.py

A Python-based proof of concept using Paramiko to demonstrate the authentication behavior.

The current implementation uses a short-password authentication attempt followed by an overlong-password attempt on the same SSH transport.

The PoC is intended for controlled, authorized reproduction only.

Requirements:

  • Python 3
  • Paramiko

Install the dependency:

python3 -m pip install paramiko

Run against an authorized test environment:

python3 poc/cve-2026-123158-poc.py \
  --host 127.0.0.1 \
  --port 2222 \
  --user labuser

The default port and host should be adjusted to match your isolated test environment.

A successful authentication demonstrates the reproduced behavior in that environment. It does not establish that every system using musl is vulnerable.

2. Vulnerability Checker

Location:

checker/alpine-cve-check.sh

A read-only shell script designed to inspect relevant Alpine Linux and OpenSSH configuration conditions.

The checker evaluates:

  • Alpine release information.
  • OpenSSH binary and version information.
  • musl libc linkage.
  • PAM configuration.
  • Effective password authentication configuration.
  • Accounts with * in /etc/shadow.
  • Accounts with $5$ or $6$ password hashes.

Run the checker as root:

chmod +x checker/alpine-cve-check.sh
sudo ./checker/alpine-cve-check.sh

Checker exit codes

Exit codeMeaning
0No exposure indicated by the conditions checked
1Potentially exposed configuration detected
2Indeterminate or unable to perform required checks

Checker limitations

The current checker is a preliminary configuration assessment, not a definitive exploitability test.

It does not currently validate the installed OpenSSH package against Alpine's release-specific fixed package versions.

It also does not comprehensively evaluate conditional Match configurations, directory-service accounts, or every possible account access restriction.

Télécharger l’outil

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 La boîte à outils OSINT ultime : graphe d'enquête, notation de confiance, familles d'alias, carte, chronologie et rapports. 49 modules, plus de 400 sites, aucune clé API requise.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # Application d'exécution en un clic GhostLock (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    Plateforme CSIRT qui ingère les rapports Shadowserver dans MongoDB et les rejoue sous forme de cartes interactives, d'analyses, de constats, d'avis et de tableaux de bord exécutifs.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Boîte à outils red team côté navigateur avec 102 outils hors ligne pour la reconnaissance, la génération de payloads, les attaques par identifiants, la cryptographie, l'encodage et le reporting d'engagement.

    336
  • 5

    ARTEX

    baarai/artex

    Plateforme autonome de tests d'intrusion multi-agents basée sur des LLM, avec agents planificateur/ouvrier, graphes d'actifs et d'exploration, enregistrement du trafic MITM et retest des vulnérabilités.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    Le système d'action pour la cybersécurité native IA—où l'intention devient une exécution gouvernée, les preuves deviennent une mémoire opérationnelle, et chaque opération améliore la suivante.

    322

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →