Hash: SHA256

             AUSCERT External Security Bulletin Redistribution

 CVE-2021-31805: Apache Struts: Forced OGNL evaluation, when evaluated on
      raw not validated user input in tag attributes, may lead to RCE
                               13 April 2022


        AusCERT Security Bulletin Summary

Product:           Apache Struts
Publisher:         Apache
Operating System:  Windows
                   UNIX variants (UNIX, Linux, OSX)
Resolution:        Patch/Upgrade
CVE Names:         CVE-2021-31805  

Original Bulletin: 

Comment: CVSS (Max):  None available when published

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


Forced OGNL evaluation, when evaluated on raw not validated user input in tag
attributes, may lead to remote code execution - same as S2-061.

 Who should read this   All Struts 2 developers and users

Impact of vulnerability Possible Remote Code Execution vulnerability

Maximum security rating Important

    Recommendation      Upgrade to Struts 2.5.30 or greater

   Affected Software    Struts 2.0.0 - Struts 2.5.29

       Reporters        Chris McCown

    CVE Identifier      CVE-2021-31805


The fix issued for CVE-2020-17530 (S2-061) was incomplete. Still some of the
tag's attributes could perform a double evaluation if a developer applied
forced OGNL evaluation by using the %{...} syntax. Using forced OGNL evaluation
on untrusted user input can lead to a Remote Code Execution and security


Avoid using forced OGNL evaluation on untrusted user input, and/or upgrade to
Struts 2.5.30 or greater which checks if expression evaluation won't lead to
the double evaluation.


Struts won't accept double evaluation issues caused by not validated end-user
input (owing to developer error) anymore as vulnerability. We accepted this one
as vulnerability because it's about an error in our previously accepted
vulnerability. We welcome and appreciate reports in this regard to minimize
developer error effect albeit!

Backward compatibility

No issues expected when upgrading to Struts 2.5.30


Do not use forced OGNL evaluation in the tag's attributes based on untrusted/
unvalidated user input, please follow out recommendations from the Security

- --------------------------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:


Australian Computer Emergency Response Team
The University of Queensland
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.
Comment: http://www.auscert.org.au/render.html?it=1967