ESB-2017.1714 - ALERT [Win][UNIX/Linux] Apache Struts: Execute arbitrary code/commands - Remote/unauthenticated 2017-07-10

Printable version
PGP/GPG verifiable version

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2017.1714
          Possible RCE in the Struts Showcase app in the Struts 1
                   plugin example in Struts 2.3.x series
                               10 July 2017

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           Apache Struts
Operating System:  UNIX variants (UNIX, Linux, OSX)
                   Windows
Impact/Access:     Execute Arbitrary Code/Commands -- Remote/Unauthenticated
Resolution:        Mitigation
CVE Names:         CVE-2017-9791  

Original Bulletin: 
   http://struts.apache.org/docs/s2-048.html

- --------------------------BEGIN INCLUDED TEXT--------------------

S2-048

Summary

Possible RCE in the Struts Showcase app in the Struts 1 plugin example in 
Struts 2.3.x series


Who should read this     All Struts 2 developers and users should read this
Impact of vulnerability  Possible RCE when using the Struts 2 Struts 1 plugin
Maximum security rating  High
Recommendation           Please read the Solution section
Affected Software        Struts 2.3.x with Struts 1 plugin and Struts 1 action
Reporter                 icez <ic3z at qq dot com> from Tophant Competence Center
CVE Identifier           CVE-2017-9791


Problem

It is possible to perform a RCE attack with a malicious field value when using
the Struts 2 Struts 1 plugin and it's a Struts 1 action and the value is a 
part of a message presented to the user, i.e. when using untrusted input as a
part of the error message in the ActionMessage class.

Solution

Always use resource keys instead of passing a raw message to the ActionMessage
as shown below, never pass a raw value directly

messages.add("msg", new ActionMessage("struts1.gangsterAdded", gform.getName()));

and never like this

messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " was added"));

Backward compatibility

No backward incompatibility issues are expected.

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBWWLHqox+lLeg9Ub1AQh/OQ//XkRitUFahQUyDN2xC+DsuvwI5Z8mmCl7
o84ipZac6dKxgtFv0CdEZMfvsPvj7iU/wZjSZnOsk9c0dD7X+ClFXGhw4g6Z7dme
2TwVatQ7iwFqbrEodb2j4xxhYMgX8Tf9xTG0nIGtwZWvXDav3gWYnXA+OU+bj/LE
TfAxNA4NRmOVra6pIjjdMnAgjYbSKZ1/QQYaWGCO3xstI5PHbd2ZLOrccHHxqYzz
6RFAViM4JnJRotey0c7pmDpWlK5RU/ypD8xHpBz9pl+6ifQ7LkYK1XjFz1DJiw1i
g/4azjAvzLW5ubzNOpxF69olRRqb494ZiWqlSLEg7Oj2DtpOmkU/xBpJiIMHIlIW
FzQlOBkxZ8wPEyK7VphyzJ6tZ1ymOdHe44qp0jE8v6WjfXxStjg2aIqP32uvVUhx
7Y5loLOhH8nIfcweMaJy6pu46+ls+twlBqgZ2Gj+OWidT3+nZwa26VoSYWAddBjG
BsnNNxzH671lww3fLWGrT8Ae3DP05ecz7UIWa88qTI9WOQUGOoeqLdvY4vfanOzH
aD9EanwtfZnq1R1p8zDtFUkvmCqpqM/lpn+3cJEWgL9Q6TnWRGKOqrfpiRL23LBE
gQQAI3EhUTPDW9zlssBDTf5S9uJyOi6w9SiX/sXQFY7qTe2PtsTaipqQhI8sK4jb
01piHr3qy6o=
=WSgg
-----END PGP SIGNATURE-----

« Back to bulletins