Skip to content
KitploitKITPLOIT
FerramentasExploitsBlog
Log in
Enviar
FerramentasExploitsBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

FeedsContatoPrivacidade© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
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
Ferramentas/GitHubGitHub/garvthakkar17/sshole-alpine-cve-2026-123158
Defensive ToolsVulnerability ScannersVulnerability AnalysisExploitationConfiguration AuditingAuthenticationLearning & Education
GitHub
Compartilhar
garvthakkar17/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.

Ver Repositório
há 13 diasAinda não revisado
Conteúdo não disponível no idioma solicitado. Mostrando versão em inglês.

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.

Baixar ferramenta

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # Aplicativo de Execução em Um Toque GhostLock (CVE-2026-43499)

    977
  • 2

    OsintHunter

    letox4/osinthunter

    🎯 O kit definitivo de OSINT: grafo de investigação, pontuação de confiança, famílias de alias, mapa, linha do tempo e relatórios. 49 módulos, mais de 400 sites, sem necessidade de chaves de API.

    742
  • 3

    wifit3

    derv82/wifit3

    Wifite, mas apenas USB e multiplataforma.

    731
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer é uma plataforma de código aberto de Gerenciamento de Acesso Privilegiado (PAM) que fornece às equipes de DevOps e TI acesso seguro e sob demanda a endpoints SSH, RDP, Kubernetes, Banco de Dados e RemoteApp através de um navegador web.

    484
  • 5

    SafeLine

    chaitin/safeline

    WAF auto-hospedado e proxy reverso que filtra tráfego HTTP malicioso, bloqueia injeção SQL, XSS e ataques de bots, com limitação de taxa e criptografia dinâmica de HTML/JS.

    438
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    O sistema de ação para cibersegurança nativa em IA—onde a intenção se torna execução governada, a evidência se torna memória operacional, e cada operação melhora a próxima.

    399

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →