IPBUF安全漏洞报告
English
CVE-2026-32897 CVSS 3.7 低危

CVE-2026-32897 OpenClaw认证令牌复用漏洞

披露日期: 2026-03-21

漏洞信息

漏洞编号
CVE-2026-32897
漏洞类型
信息泄露
CVSS评分
3.7 低危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
OpenClaw

相关标签

信息泄露认证绕过OpenClaw密钥管理CVE-2026-32897

漏洞概述

OpenClaw在2026.2.22之前的版本中存在安全漏洞。当配置`commands.ownerDisplay`为hash且未设置`commands.ownerDisplaySecret`时,系统会错误地复用`gateway.auth.token`作为哈希密钥。攻击者若能访问发送给第三方模型提供商的系统提示,即可从哈希输出中推导出网关认证令牌,从而危及网关安全。

技术细节

该漏洞源于OpenClaw在处理所有者ID提示混淆时的密钥管理不当。系统在特定配置下(`commands.ownerDisplay`设为hash且`commands.ownerDisplaySecret`未设置),会回退使用用于网关认证的敏感令牌(`gateway.auth.token`)作为哈希算法的密钥。这种跨安全域的机密复用破坏了认证机制的隔离性。由于哈希函数是确定性的,如果攻击者能够拦截或访问发送给外部LLM的系统提示内容(其中包含哈希后的所有者ID),他们便可以通过离线计算或字典攻击推导出原始的认证令牌。一旦获取该令牌,攻击者即可冒充合法网关进行操作,完全绕过身份验证。

攻击链分析

STEP 1
1. 配置识别
攻击者确认目标OpenClaw系统未设置commands.ownerDisplaySecret,且commands.ownerDisplay为hash。
STEP 2
2. 获取哈希值
攻击者通过某种方式(如访问第三方模型日志或中间人攻击)获取发送给模型提供商的系统提示,提取其中的哈希值。
STEP 3
3. 离线推导
攻击者利用已知的Owner ID和截获的哈希值,通过离线暴力破解或字典攻击反向推导出网关认证令牌。
STEP 4
4. 认证绕过
攻击者使用推导出的网关认证令牌,冒充合法网关进行身份验证,成功获取系统访问权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import hmac import hashlib # Proof of Concept: Demonstrating how the token reuse allows derivation. # Scenario: Attacker has access to the system prompt containing the hash. # Configuration simulation GATEWAY_AUTH_TOKEN = "super_secret_auth_token_123" OWNER_ID = "admin_user" # Vulnerable Logic: Using auth token as hash secret def vulnerable_hash_logic(owner_id, auth_token): return hmac.new(auth_token.encode(), owner_id.encode(), hashlib.sha256).hexdigest() # 1. System generates the hash for the prompt hash_in_prompt = vulnerable_hash_logic(OWNER_ID, GATEWAY_AUTH_TOKEN) print(f"[System] Hash sent to 3rd party: {hash_in_prompt}") # 2. Attacker sees the hash and knows the Owner ID (often predictable or visible) attacker_known_hash = hash_in_prompt attacker_known_owner_id = OWNER_ID # 3. Attacker attempts to derive the token (Brute-force simulation) print("[Attacker] Starting offline derivation...") # In a real scenario, the attacker would use a dictionary of potential tokens or leaked passwords. # Here we simulate the verification step. found = False # Simulating a guess matching the real token if vulnerable_hash_logic(attacker_known_owner_id, GATEWAY_AUTH_TOKEN) == attacker_known_hash: print(f"[Attacker] Token Found: {GATEWAY_AUTH_TOKEN}") print("[Result] Gateway Authentication Compromised!") else: print("[Result] Token not found in dictionary.")

影响范围

OpenClaw < 2026.2.22

防御指南

临时缓解措施
如果无法立即升级,请务必在配置文件中显式设置一个强随机字符串作为`commands.ownerDisplaySecret`,确保其与`gateway.auth.token`不同,从而阻断利用哈希推导认证令牌的路径。

参考链接

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