Vulnerability · Published Apr 12, 2022 · Assigned by apache
CVE-2021-31805Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
Critical 9.8
In plain English
A critical-severity expression language injection in Apache Struts from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 85.4% (higher than 99.7% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
The fix issued for CVE-2020-17530 was incomplete. So from Apache Struts 2.0.0 to 2.5.29, 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 degradation.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.apache.struts:struts2-core | 2.5.30 | GHSA-v8j6-6c2r-r27c |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Struts | 2.0.0 to 2.5.29 |
Weakness: CWE-917
References
- https://cwiki.apache.org/confluence/display/WW/S2-062 x_refsource_MISC
- [oss-security] 20220412 CVE-2021-31805: Apache Struts: Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE. mailing-list, x_refsource_MLIST
- https://www.oracle.com/security-alerts/cpujul2022.html x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220420-0001/ x_refsource_CONFIRM