You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2013/07/19 10:34:48 UTC

[jira] [Updated] (WW-4146) cache attack at OgnlUtil.expressions

     [ https://issues.apache.org/jira/browse/WW-4146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-4146:
------------------------------

    Description: 
in class com.opensymphony.xwork2.ognl.OgnlUtil, code :

{code:java}
tree = expressions.get(expression);
if (tree == null) {
	tree = Ognl.parseExpression(expression);
	expressions.putIfAbsent(expression, tree);
}
{code}

every parameter in the request cached in  field expressions  which is an instances of ConcurrentMap<String, Object>, use parameterName as key. so i construct huge different parameters that has different name (like  "abc[123],  abc[124]" ), they all cached in  expressions, this cause outofmemory error, and let map acted like a list .

  was:
in class com.opensymphony.xwork2.ognl.OgnlUtil, code :

tree = expressions.get(expression);
if (tree == null) {
	tree = Ognl.parseExpression(expression);
	expressions.putIfAbsent(expression, tree);
}

every parameter in the request cached in  field expressions  which is an instances of ConcurrentMap<String, Object>, use parameterName as key. so i construct huge different parameters that has different name (like  "abc[123],  abc[124]" ), they all cached in  expressions, this cause outofmemory error, and let map acted like a list .

    
> cache attack at  OgnlUtil.expressions
> -------------------------------------
>
>                 Key: WW-4146
>                 URL: https://issues.apache.org/jira/browse/WW-4146
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.3.15.1
>            Reporter: bruce liu
>            Priority: Critical
>
> in class com.opensymphony.xwork2.ognl.OgnlUtil, code :
> {code:java}
> tree = expressions.get(expression);
> if (tree == null) {
> 	tree = Ognl.parseExpression(expression);
> 	expressions.putIfAbsent(expression, tree);
> }
> {code}
> every parameter in the request cached in  field expressions  which is an instances of ConcurrentMap<String, Object>, use parameterName as key. so i construct huge different parameters that has different name (like  "abc[123],  abc[124]" ), they all cached in  expressions, this cause outofmemory error, and let map acted like a list .

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira