Solution

As of XWork 2.0.5, being part of the Struts 2.0.11.2 release, the ParameterInterceptor was changed to provide a whitelist mechanism for acceptable, non malicious parameter names. Therefore, in the example above, the given parameter will be ignored. Nevertheless there are still cases where the whitelist mechanism does not prevent the context from being manipulated, thus XWork 2.0.5 and Struts 2.0.11.2 do not fix the issue satisfactorily.

As of XWork 2.0.6, being part of the Struts 2.0.12 release, the ParametersInterceptor applies stack changes to a copy of the original value stack, for which context parameters which might be subject to manipulations are cleared beforehand.

You can either obtain a copy of the released XWork 2.0.6 jar as a drop in replacement for the XWork 2.0.4 / 2.0.5 jar used in Struts 2.0.9 and above, or download a full release of Struts 2.0.12, which contains the corrected XWork library.