Spring security URI路径参数安全绕过漏洞

漏洞起因
设计错误
危险等级

 
影响系统
IBM Websphere Application Server 7.0
IBM Websphere Application Server 6.1
 
不受影响系统
 
危害
远程攻击者可以利用漏洞绕过限制访问受限资源。
 
攻击所需条件
攻击者必须访问Spring Security保护的应用。
 
漏洞信息
Spring Security的前身是Acegi Security ,是Spring项目组中用来提供安全认证服务的框架。理服务集。
在处理security-constraint时Spring Security没有考虑URL路径参数。通过在请求上增加URL路径参数,攻击者可以绕过security-constraint。问题根源是没有正确过滤Servlet Specification中的路径参数。一些Servlet容器把路径参数包含在返回给getPathInfo()的值中,而有些没有。Spring Security使用getPathInfo()返回的值作为security-constraint处理的映射请求的一部分,某些意想不到的路径参数存在可导致绕过constraint限制。
使用所有当前版本的Apache TOmcat不受此漏洞影响,因为Tomcat遵循Servlet专家小组的指导,剥离了getContextPath(), getServletPath()和getPathInfo()返回值中的路径参数。
 
测试方法
如应用程序使用如下拦截URL模式:
<intercept-url pattern="/*-add.do" access="PERMISSION_ADMIN"></intercept-url>
来保护类似如下的URLs:
/myapp/account-add.do
攻击者可以使用如下URL形式绕过限制:
/ctx/account-add.do;x=-pub.do
 
厂商解决方案
 Spring Security 2.0.6或者Spring Security 3.0.4不受此漏洞影响,建议用户下载使用:
http://www.springsource.com/download/community?project=Spring%20Security
 
漏洞提供者
Ed Schaller

发表评论?

0 条评论。

发表评论