Apache Struts2に深刻な脆弱性:セキュリティ - ZDNet Japan

SecuniaStruts2に含まれれるXWorkにコマンドインジェクションが可能な脆弱性が存在するとの報告

影響度は、5段階中2番目の「Highly critical」に位置づけられている。同プロダクトを利用している場合、早急にアップデートされたい。XWorkのInputバリデーションにOGNLコマンドインジェクションが可能な脆弱性がある。

Struts側で情報提供をしていますが、一部のフィールドで空白禁止の項目を作成して空白にされると、%{1+1}が動いてしまうらしい。

The 'altSyntax' feature of WebWork 2.1+ and Struts 2 allows OGNL expressions to be inserted into text strings and is processed recursively. This allows a malicious user to submit a string, usually through an HTML text field, containing an OGNL expression that will then be executed by the server if the form validation has failed. For example, say we had this form that required the 'phoneNumber' field to not be blank:

<s:form action="editUser">
  <s:textfield name="name" />
  <s:textfield name="phoneNumber" />
</s:form>

The user could leave the 'phoneNumber' field blank to trigger the validation error, then populate the 'name' field with %{1+1}. When the form is re-displayed to the user, the value of the 'name' field will be '2'. The reason is the value field is, by default, processed as %{name}, and since OGNL expressions are evaluated recursively, it is evaluated as if the expression was %{%{1+1}}.

The OGNL parsing code is actually in XWork and not in WebWork 2 or Struts 2.