CVE-2021-31805
publishedForced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Apache Software Foundation | — | Apache Struts2.0.0 to 2.5.29 | Affected | Not stated | apache |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Apache Software Foundation | Apache Struts | 2.0.0 to 2.5.29 (affected) | apache · cna |
Weaknesses
1- CWE-917 CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
4- [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. http://www.openwall.com/lists/oss-security/2022/04/12/6
- https://cwiki.apache.org/confluence/display/WW/S2-062
- https://security.netapp.com/advisory/ntap-20220420-0001/
- https://www.oracle.com/security-alerts/cpujul2022.html
Provider assertions
2apache · cna
Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- cffb447a60f3b7b22c5c6c80f06fe8796416f8f3eb0a755a18abc7dae379fb38
- Ingested
- 23 Sep 2026, 07:54:21 UTC
- Source record
- Official CVE record