QID 150504

Date Published: 2022-05-11

QID 150504: Apache Struts 2 Remote Code Execution Vulnerability (CVE-2021-31805)

Apache Struts is a free, open-source, MVC framework for creating elegant, modern Java web applications.

In affected versions of Apache Struts 2, the fix for CVE-2020-17530 was incomplete as a result some of the tag attributes perform a double evaluation if a developer applies forced OGNL evaluation by using the "%{...}" syntax. Using a forced OGNL evaluation on untrusted user input allows an attacker to perform remote code execution and security degradation.

Affected Versions:
Apache Struts 2.0.0 - 2.5.29

QID Detection Logic:
This QID sends POST and GET request along with the OGNL payload inside some tag attributes, where vulnerable servers will make a DNS query that will trigger Qualys Periscope detection mechanism.

Successful exploitation of this vulnerability could allow an remote attacker to execute arbitrary code on the target system.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 7.5 severity.
  • Solution

    Customers are advised to upgrade Apache Struts 2.5.30 or higher. Please refer to the S2-062 advisory for more information pertaining to this vulnerability.

    CVEs related to QID 150504

    Software Advisories
    Advisory ID Software Component Link
    S2-062 URL Logo cwiki.apache.org/confluence/display/WW/S2-062