CVE-2021-31805
Java vulnerability analysis and mitigation

Overview

The vulnerability CVE-2021-31805 affects Apache Struts versions 2.0.0 to 2.5.29. This vulnerability is related to an incomplete fix for CVE-2020-17530, where certain tag attributes could still perform a double evaluation if a developer applied forced OGNL evaluation using the %{...} syntax. The vulnerability was discovered in April 2022 and could lead to Remote Code Execution when exploited (Apache S2-062).

Technical details

The vulnerability has a CVSS v3.1 Base Score of 9.8 (CRITICAL) with the vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The technical issue involves the improper neutralization of special elements used in an Expression Language Statement (CWE-917). The vulnerability specifically occurs when forced OGNL evaluation is applied to untrusted user input in tag attributes (NVD Database).

Impact

When successfully exploited, this vulnerability can lead to Remote Code Execution and security degradation. The high CVSS score indicates that the vulnerability can result in complete compromise of system confidentiality, integrity, and availability when exploited (NVD Database).

Mitigation and workarounds

The primary mitigation is to upgrade to Apache Struts version 2.5.30 or greater, which includes checks to prevent double evaluation. Additionally, developers should avoid using forced OGNL evaluation on untrusted user input. If immediate upgrading is not possible, careful validation of user input is essential (Apache S2-062).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management