
Proof-of-concept exploit for CVE-2026-41940, an authentication bypass chain in WHM/cPanel. Multi-threaded scanner that changes root password on vulnerable targets. For authorized testing only.
This repository contains a Proof-of-Concept (PoC) script based on the authentication bypass chain for cPanel/WHM (via the whostmgrsession cookie and HTTP headers). After a successful compromise, the script changes the root password and writes the result to a file.
Use this software only on systems you have explicit permission to test (your own lab environment, contracted pentests, vendor-approved security testing). Unauthorized access is a crime in most countries. This README is intended solely for security research and defense awareness; the authors are not responsible for misuse.
targets.txt)https/login), /cpsess leak via CRLF injection, do_token_denied trigger, verification via /json-api/versionres.txtHost header override (reverse proxy / virtual host scenarios)ThreadPoolExecutor)#!/usr/bin/env python2.7 — the script uses Python 2 syntax and urllib / urlparse)requirements.txtpip install -r requirements.txt
Note: On Python 2, the futures package is required for concurrent.futures (listed in the file). Porting the script to Python 3 requires adapting differences such as urllib, urlparse, print, unicode/str, and similar; this has not been done in this repository.
python CVE-2026-41940.py <target_list_file> [--hostname CANONICAL_HOST] [--threads N] [--timeout SECONDS]
Output:
res.txt in URL and session info formatAuthorization / cookie combinations and unexpected redirects.├── CVE-2026-41940.py # Main script
├── requirements.txt # pip dependencies
└── README.md
Changing passwords on production systems after compromise carries the risk of data loss and service disruption. Test in non-production, isolated lab environments and with written permission; share your findings through responsible disclosure (coordinated disclosure) processes.
| Argument | Description |
|---|
list_file | One target per line (host or URL; https:// is prepended if http:// is absent) |
--hostname | Forces the canonical name to be used for Host: and related logic in all requests |
--threads | Number of concurrent threads (default: 15) |
--timeout | Connection timeout in seconds (default: 15) |