Exploit for SSHole (CVE-2026-123158) sends a password over 256 bytes to OpenSSH on musl-libc systems (without PAM), causing crypt() to return *, matching locked /etc/shadow entries (*) to bypass authentication and execute commands without valid credentials.
<div align="center">
# SSHole (CVE-2026-123158) Exploit

<br>

</div>
## Overview
**SSHole** (**CVE-2026-123158**) is an authentication bypass flaw affecting OpenSSH password authentication on systems using **musl-libc** (without PAM), where sending an overly long password string during login bypasses authentication and allows running commands without valid credentials on vulnerable targets.
Specifically, on `musl-libc` systems, accounts whose `/etc/shadow` password field is set to `*` (locked) can be bypassed because `musl`'s `crypt()` implementation returns `*` for any password longer than 256 bytes. Because `sshd` directly compares this return value against the `/etc/shadow` field, both sides evaluate to `*` and authentication succeeds without a valid password.
> **References:**
> - [sshhole.com](https://sshhole.com/) – Original vulnerability disclosure and technical write-up
> - [NVD – CVE-2026-123158](https://nvd.nist.gov/vuln/detail/CVE-2026-123158) – National Vulnerability Database entry
> - [OpenSSH Release Notes (10.6p2)](https://www.openssh.org/releasenotes.html#10.6p2) – Official OpenSSH advisory and fix announcement
---
## Exploit Demo
<p align="center">
<img src="Demo/demo.gif" alt="SSHole Demo" />
</p>
---
## Usage
### Prerequisites
* **Python 3**
* **`paramiko`** (the script attempts to install it automatically via `pip` if missing)
### Syntax
```bash
python3 ./sshole.py [HOST] [PORT] [USER] [COMMAND]
python3 ./sshole.py -h | --help
```
### Arguments
| Argument | Description |
| :--- | :--- |
| `[HOST]` | Target IP address or hostname |
| `[PORT]` | Target SSH port number (commonly `22` or a custom port) |
| `[USER]` | Target username |
| `[COM