
Prova de conceito para exploração da vulnerabilidade CVE-2026-123158.
Python 3 PoC for controlled validation of a possible SSH authentication bypass associated with the SSHole vulnerability, described in the OpenSSH 10.6p2 security advisory.
Warning: tool developed for authorized security testing, audits, and laboratory environments. Use only on servers under your administration or with express authorization.
The goal of this project is to assist system administrators and offensive security professionals in assessing SSH servers potentially affected by a flaw in the processing of excessively long passwords.
The vulnerability is associated with an interaction between OpenSSH and the musl libc library, under certain compilation and SSH service configuration conditions.
The PoC performs a controlled authentication attempt using a password composed of repeated characters, allowing observation of the server's response.
Conditions relevant to the assessment:
musl libc.* password field in /etc/shadow.The presence of these conditions should be investigated before interpreting the test results.
Clone the repository:
git clone https://github.com/SEU-USUARIO/sshole-poc.git
cd sshole-poc
Install the dependencies:
pip3 install paramiko
Performs an authentication attempt using the root user and a password consisting of 300 A characters.
python3 sshole_poc.py -t 192.168.1.100
python3 sshole_poc.py -t 192.168.1.100 -u usuario
python3 sshole_poc.py -t 192.168.1.100 -p 2222
python3 sshole_poc.py -t 192.168.1.100 -l 300
The length allowed by the tool is 257 to 1,024 characters.
| Parameter | Description | Default |
|---|---|---|
-t | Target IP address or hostname | Required |
-u | SSH user | root |
-p | SSH port | 22 |
-l | Password length | 300 |
| Result | Interpretation |
|---|---|
AUTHENTICATION ACCEPTED | Possible authentication bypass. Requires investigation and confirmation. |
Authentication rejected | The bypass was not reproduced in this attempt. |
SSH error | Inconclusive result. |
Connection timeout | Inconclusive result. |
Network error | Connectivity or communication failure. |
Important: an accepted authentication does not by itself prove the vulnerability. It is necessary to verify whether access occurred due to the investigated flaw and whether the prerequisites are present.
Likewise, a rejected authentication does not guarantee that the server is protected.
The following commands can help identify conditions relevant to the exposure.
ssh -V
ldd --version
grep -i '^UsePAM' /etc/ssh/sshd_config
The absence of an explicit directive does not prove that OpenSSH was compiled without PAM. It is also necessary to check the package's compilation options.
sshd -T | grep passwordauthentication
*sudo awk -F: '$2=="*" {print $1}' /etc/shadow
The following is recommended:
musl libc and the specific build conditions.This PoC performs only a single authentication attempt per execution.
It does not:
This project is intended exclusively for educational purposes and security validation in authorized environments.
The author is not responsible for damages, service unavailability, or misuse of this tool.
Use responsibly.