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/k3ystr0k3r/cve-2026-123158
Vulnerability AnalysisExploitationNetwork SecurityPenetration TestingAuthenticationRemote Access Tool
GitHubk3ystr0k3r/cve-2026-123158

CVE-2026-123158

Python proof-of-concept for CVE-2026-123158 (SSHole), an OpenSSH password authentication bypass on musl libc systems without PAM, with root cause analysis and mitigation notes.

View Repository
1 day agoNot yet reviewed
Share

CVE-2026-123158 - OpenSSH Password Authentication Bypass (SSHole)

CVE-2026-123158 | CVSS 3.1: 8.1 (High)

An authentication bypass in OpenSSH affecting Linux systems running musl libc without PAM. SSHole is a password authentication bypass affecting OpenSSH's sshd implementation on Linux systems using musl libc without PAM. The vulnerability originates from an interaction between OpenSSH's internal password verification logic and musl's crypt() implementation. When a specially sized password is processed, musl's crypt() can return the literal string * instead of a valid password hash. OpenSSH does not correctly distinguish this error result from a legitimate stored password value. For accounts whose shadow password field contains *, the comparison can consequently succeed. An unauthenticated remote attacker can exploit this behaviour to bypass SSH password authentication and gain access to affected accounts. The vulnerability is tracked as CVE-2026-123158.

Vulnerability Information

AttributeDetails
NameSSHole
CVECVE-2026-123158
ComponentOpenSSH sshd
Vulnerability TypePassword Authentication Bypass
CWECWE-394
CVSS 3.18.1 High
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
Affected PlatformLinux
C Librarymusl libc
AuthenticationInternal password authentication without PAM
Fixed Upstream VersionOpenSSH 10.6p2

CVSS Vector:

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected Configurations

The vulnerability affects OpenSSH versions before 10.6p2 when running on Linux with musl libc and without PAM.

However, the authentication bypass requires additional account and configuration conditions.

The following conditions must be satisfied:

  • OpenSSH is linked against musl libc.
  • PAM is not used for SSH password authentication.
  • PasswordAuthentication is enabled.
  • At least one local account has a shadow password field containing exactly *.
  • Another local account has a SHA-256 or SHA-512 password hash available for salt selection.
  • The SSH service is reachable by the attacker.

For root authentication, PermitRootLogin yes must also be configured.

An account containing ! in its shadow password field is not equivalent to an account containing * for this vulnerability.

Potentially affected environments

  • Alpine Linux systems running the non-PAM OpenSSH server.
  • OpenWrt systems using affected musl-based OpenSSH builds.
  • Buildroot-based Linux environments.
  • Yocto-based embedded Linux distributions.
  • Custom Linux images using musl libc and OpenSSH without PAM.

These platforms are not automatically vulnerable. Their OpenSSH build, authentication configuration and account database must satisfy the required conditions.

Generally unaffected configurations

  • OpenSSH using glibc rather than musl.
  • OpenSSH configurations using PAM for password authentication.
  • Systems with SSH password authentication disabled.
  • Systems running a patched OpenSSH build.
  • SSH implementations that do not use the affected OpenSSH authentication path.

Technical Analysis

1. Password authentication

When PAM is disabled, OpenSSH performs password verification internally.

The authentication process involves the following operations:

  1. The SSH client submits a password.
  2. sshd retrieves the target account's stored password field.
  3. OpenSSH determines which salt to use for password verification.
  4. The supplied password is passed to crypt().
  5. The resulting value is compared against the stored password field.
  6. Authentication succeeds or fails depending on the comparison.

The relevant implementation is found in:

auth-passwd.c
openbsd-compat/xcrypt.c
openbsd-compat/port-uw.c

2. Salt selection

An important part of the vulnerability is how OpenSSH handles accounts without a usable password hash.

When the target account has a short password field, OpenSSH does not use that field directly as a cryptographic salt.

Instead, the compatibility implementation can select a salt from another local account containing a valid password hash.

The relevant function is:

pick_salt()

This behaviour originated from earlier password-authentication timing protections, including work associated with CVE-2016-6210.

For SSHole, this salt-selection behaviour becomes part of the vulnerable execution path.

3. musl crypt() error handling

musl's SHA-256 and SHA-512 password hashing implementations impose a maximum password input length of 256 bytes.

When an input exceeds this limit, the hashing operation fails.

Instead of returning a valid password hash, musl's crypt() returns:

*

This value is an error marker.

It is not a valid SHA-256 or SHA-512 password hash.

However, * is also commonly used in shadow password fields to represent accounts without a usable password.

This creates the conditions for the authentication bypass.

4. The incorrect comparison

The vulnerable authentication path ultimately compares the result returned by crypt() with the stored password field.

Conceptually:

encrypted_password = xcrypt(password, salt);

return encrypted_password != NULL &&
       strcmp(encrypted_password, pw_password) == 0;

Under the vulnerable conditions:

Target account password field: *

musl crypt() result:           *

String comparison:             MATCH

The error marker is incorrectly treated as a successful password verification result.

This is the central failure behind SSHole.

The issue is not a cryptographic collision, password cracking technique or memory corruption vulnerability.

It is an authentication logic error caused by interpreting an invalid return value as a valid password hash.


Exploitation Behaviour

The documented vulnerable input range is 256–1024 characters in the CVE description. Independent reproduction has demonstrated successful authentication with inputs of 257–1024 bytes.

The upper boundary is associated with OpenSSH's password input limit.

An additional implementation detail is relevant to reproducing the vulnerability.

The two-attempt behaviour

Independent source-level reproduction identified an interaction involving pick_salt() and musl's shadow-password handling.

During the first authentication attempt:

  • OpenSSH selects a salt from another account.
  • The salt-selection routine reads shadow entries.
  • musl reuses an internal shadow-password buffer.
  • The selected hash is subsequently cleared.
  • The target account's stored password pointer can reference the same buffer.
  • The first comparison consequently fails.

The selected salt is cached by pick_salt().

On a subsequent attempt within the same SSH connection, the cached salt avoids the same shadow-entry traversal.

The target account's stored * value remains available for the comparison.


This behaviour has been reproduced in controlled environments. It should not be confused with a requirement that every vulnerable installation necessarily exhibits identical logging or client behaviour.

---

## Root Cause Summary

The vulnerability requires three interacting behaviours:

| Component | Behaviour |
|---|---|
| OpenSSH | Selects an alternative salt when the target account has no usable hash |
| musl libc | Returns `*` when the supported password hashing operation fails |
| Shadow password database | Can contain `*` as an account's password field |

Individually, these behaviours have legitimate purposes.

The vulnerability emerges when their interaction allows an error marker to satisfy the password comparison.

---

## Proof of Concept

This repository contains a Python proof of concept for CVE-2026-123158.

```text
.
└── exploit.py

The script is intended for controlled vulnerability verification against authorized SSH services.

Requirements

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    961
  • 2

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    755
  • 3

    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.

    625
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    501
  • 5

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    456
  • 6

    mcp-reverse

    1llu50ry/mcp-reverse

    MCP server exposing 180+ reverse-engineering tools that aggregate Ghidra, IDA, x64dbg, Frida and 56 other backends with native binary parsers and a 4,200-skill knowledge base.

    344

Explore all tools

Browse our collection of tools

View all tools →