IPBUF安全漏洞报告
English
CVE-2026-33542 CVSS 4.8 中危

CVE-2026-33542 Incus镜像指纹验证缺失漏洞

披露日期: 2026-03-26

漏洞信息

漏洞编号
CVE-2026-33542
漏洞类型
缓存投毒
CVSS评分
4.8 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Incus

相关标签

Incus缓存投毒验证绕过容器安全CVE-2026-33542

漏洞概述

Incus在从simplestreams服务器下载镜像时,未对镜像指纹进行严格验证。这导致了镜像缓存投毒的风险,在特定多租户环境下,可能导致租户运行攻击者控制的恶意镜像而非预期镜像,从而影响系统的机密性和完整性。

技术细节

该漏洞的核心在于Incus客户端在通过Simplestreams协议拉取容器或虚拟机镜像时,未能实施有效的完整性校验机制。具体而言,当客户端从服务器获取镜像元数据及文件流后,代码逻辑中缺失了对镜像文件实际哈希值与元数据中声明的指纹进行比对的步骤。这一缺陷使得攻击者能够利用中间人攻击(MITM)手段,或者直接攻陷/控制Simplestreams镜像源,向受害者推送经过篡改的恶意镜像。由于Incus具有镜像缓存机制,一旦恶意镜像被下载并存储在本地缓存中,后续任何请求该特定镜像的租户或进程都将直接复用该恶意文件。这种攻击方式不仅绕过了预期的安全检查,还可能导致多租户环境下的供应链攻击,使攻击者能够在目标容器内执行预设的恶意代码,造成数据泄露(机密性影响)或环境被破坏(完整性影响)。

攻击链分析

STEP 1
侦察
攻击者识别目标Incus实例正在使用的Simplestreams镜像服务器地址。
STEP 2
拦截或篡改
攻击者通过中间人攻击(MITM)拦截网络流量,或者直接入侵并控制镜像源服务器。
STEP 3
投毒
当目标Incus实例请求镜像时,攻击者返回篡改后的恶意镜像文件。由于缺乏指纹验证,客户端接受该文件并存入缓存。
STEP 4
执行
受害者或其他租户请求启动该镜像时,系统直接加载缓存中的恶意镜像,导致攻击者代码在容器内执行。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# Conceptual PoC for CVE-2026-33542 # This script simulates a vulnerable client downloading an image # without verifying the fingerprint against the content hash. import hashlib class VulnerableIncusClient: def download_image(self, image_url, expected_fingerprint): print(f"[*] Downloading image from {image_url}...") # Simulate downloading image content (could be malicious) # In a real attack, this content might be served by a malicious simplestreams server image_content = b"MALICIOUS_CONTAINER_PAYLOAD_HERE" print(f"[*] Expected Fingerprint: {expected_fingerprint}") # VULNERABILITY: The client does NOT calculate the hash of image_content # and compare it with expected_fingerprint. # A secure implementation would do: # actual_hash = hashlib.sha256(image_content).hexdigest() # if actual_hash != expected_fingerprint: # raise Exception("Security Alert: Fingerprint mismatch!") print("[!] VULNERABLE: Storing image to cache without fingerprint verification.") self.cache[image_url] = image_content return True # Usage Example client = VulnerableIncusClient() client.cache = {} # Attacker provides a malicious image but claims it has a legitimate fingerprint client.download_image("http://example.com/image.iso", "sha256:legitimate_image_hash...") print("[!] Exploit successful: Cache poisoned with malicious image.")

影响范围

Incus < 6.23.0

防御指南

临时缓解措施
建议用户尽快将Incus升级至6.23.0版本以修复此漏洞。如果无法立即升级,应避免在不可信的网络环境下拉取镜像,并在下载后手动验证镜像文件的指纹哈希值是否与预期一致,防止加载被篡改的镜像。

参考链接

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