协调披露时间表
-
2022-03-09:向 [email protected] 报告问题
-
2022-03-25:Apache Commons 安全团队承认收到报告
-
2022-05-27:GHSL 请求状态更新
-
2022-05-27:Apache Commons 安全团队通知他们正在努力默认禁用脚本插值
-
2022-06-29:Apache Commons 安全团队声明“Commons Text”将被更新,以使程序员使用“危险”功能的意图完全明确
-
2022-08-11:GHSL 请求状态更新
-
2022-10-12:Apache Commons Text 发布版本 1.10.0,其中默认禁用脚本插值
概括
StringSubstitutor
默认插值器可能导致不安全的脚本评估和任意代码执行
产品
Apache Commons 文本
测试版
1.9
细节
问题:不安全的脚本评估 ( GHSL-2022-018
)
StringSubstitutor
与默认插值器 ( ) 一起使用时,将StringSubstitutor.createInterpolator()
执行可能导致任意代码执行的字符串查找。
特别是,如果不受信任的数据流入StringSubstitutor.replace()
orStringSubstitutor.replaceIn()
方法,攻击者将能够使用ScriptStringLookup
触发任意代码执行。
final StringSubstitutor interpolator = StringSubstitutor.createInterpolator();
String out = interpolator.replace("${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/foo')}");
System.out.println(out);
影响
此问题可能会导致远程代码执行 (RCE)
CVE
-
CVE-2022-42889
资源
-
https://lists.apache.org/thread/n2bd4vdsgkqh2tm14l1wyc3jyol7s1om
原文始发于微信公众号(Ots安全):GHSL-2022-018:Apache Commons 文本中的任意代码执行 - CVE-2022-42889
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论