CVE-2021-31805Apache Struts
Critical 9.8 No auth neededHigh EPSS
Follow: this CVE · Apache · Apache Struts We alert you by email or Slack (account required).
- Priority
- 82
- CVSS 3.1
- 9.8
- EPSS
- 85.4% probability of exploitation in 30 days · percentile 100
- Auth required
- No
- Published
- Apr 12, 2022
- Updated
- Jun 17, 2026
- Category
- Server · Cross-platform
- Weakness (CWE)
- CWE-917
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Struts.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Maven | org.apache.struts:struts2-core |
≥ 2.0.0 < 2.5.30 |
2.5.30 |
— |
Per OSV / GitHub Advisories (GHSA-v8j6-6c2r-r27c). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| apache | struts | ≥ 2.0.0 ≤ 2.5.29 |
Official sources
References
Links published by the sources. Open them with care.
- www.openwall.com Mailing List Mitigation Third Party Advisory
- cwiki.apache.org Mitigation Patch Vendor Advisory
- security.netapp.com Third Party Advisory
- www.oracle.com