SummaryCross-Site Scripting Vulnerability in Debug Mode and in exposed JSP files
Who should read this
All Struts 2 developers and users
Impact of vulnerability
Affects of a cross-site scripting vulnerability when debug mode is switched on or JSPs are exposed in production environment.
Maximum security rating
Turn off debug mode in production environment, apply tips from Security guideline to secure JSPs. An upgrade to Struts 2.3.20 is recommended.
Struts 2.0.0 - Struts Struts 126.96.36.199
Takayoshi Isayama, Mitsui Bussan Secure Directions, Inc. (vulnerability with JSPs)
anonymous (vulnerability with devMode)
When the Struts2 debug mode is turned on, under certain conditions an arbitrary script may be executed in the 'Problem Report' screen. Also if JSP files are exposed to be accessed directly it's possible to execute an arbitrary script.
It is generally not advisable to have debug mode switched on outside of the development environment. Debug mode should always be turned off in production setup. Also never expose JSPs files directly and hide them inside
WEB-INF folder or define dedicated security constraints to block access to raw JSP files. Please also read our Security guide - it contains useful informations how to secure your application.
Struts >= 2.3.20 is not vulnerable to this attack. We recommend upgrading to Struts 2.3.20 or higher.
No backward compatibility problems are expected.
Upgrade to Struts 2.3.20