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
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
Tools/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.

View Repository
8 days agoNot yet reviewed
Share

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.

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 →