Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Excerpt

A vulnerability introduced by wildcard matching mechanism or double evaluation of OGNL Expression allows remote command execution.

Who should read this

All Struts 2 developers and users

Impact of vulnerability

Remote command execution, remote server context manipulation, injection of malicious client side code

Maximum security rating

Highly Critical

Recommendation

Developers should immediately upgrade to Struts 2.3.14.3

Affected Software

Struts 2.0.0 - Struts 2.3.14.2

Reporter

Jon Passki from Coverity Security Research Laboratory reported directly to security@struts.a.o and via blog post

CVE Identifier

CVE-2013-1966 - TBD2135, CVE-2013-2134

Problem

Struts 2 allows define action mapping base on wildcards, like in example below:

...

If a request doesn't match any other defined action, it will be matched by * and requested action name will be used to load JSP file base on the name of action. And as value of {1} is threaten as an OGNL expression, thus allow to execute arbitrary Java code on server side. This vulnerability is combination of two problems:

  • requested action name isn't escaped or checked agains whitelist
  • double evaluation of an OGNL expression in TextParseUtil.translateVariables when combination of $ and % open chars is used.

Proof of concept

Wildcard matching

...

Warning

It is strongly recommended to upgrade to Struts 2.3.14.3, which contains the corrected OGNL and XWork library.