CVE-2021-31805
Expression Language Injection in Apache Struts
Reported by apache · Published April 12, 2022
struts2-config-browser-plugin is fixed in 2.5.29 (Maven Central)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| org.apache.struts:struts2-config-browser-plugin | Maven Central | 2.5.29 |
| org.apache.struts:struts2-convention-plugin | Maven Central | 2.5.29 |
| org.apache.struts:struts2-core | Maven Central | 2.5.29 |
| org.apache.struts:struts2-rest-plugin | Maven Central | 2.5.29 |
| org.apache.struts:struts2-struts1-plugin | Maven Central | 2.5.29 |
| struts:struts | Maven Central | 2.5.29 |
| struts | apache | 2.5.29 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Struts | 2.0.0 to 2.5.29 |
| Maven | org.apache.struts:struts2-config-browser-plugin | 2.0.0 |
| Maven | org.apache.struts:struts2-convention-plugin | 2.0.0 |
| Maven | org.apache.struts:struts2-rest-plugin | 2.0.0 |
| Maven | org.apache.struts:struts2-struts1-plugin | 2.0.0 |
| Maven | struts:struts | 2.0.0 |
| Apache Software Foundation | Apache Struts | 2.0.0 |
| Maven | org.apache.struts:struts2-core | 2.0.0 |
Timeline
- Apr 12, 2022 CVE Published
- Apr 13, 2022 EPSS Score (30 in total, the first dated here)
- Apr 15, 2022 VulnCheck XDB Entry (9 in total, the first dated here)
- May 11, 2022 VulnCheck KEV Exploitation (6 in total, the first dated here)
- Mar 20, 2026 Security Advisory (8 in total, the first dated here)
- Aug 1, 2026 Coalition ESS Score
- Nov 22, 2026 Distribution Patch (7 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-31805
vulnetix vdb fixes CVE-2021-31805
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-31805/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- 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-listx_refsource_MLIST
- x_refsource_MISC
- x_refsource_CONFIRM
- https://nvd.nist.gov/vuln/detail/CVE-2021-31805 advisory