CVE-2021-31805
CRITICAL 9.8CVSS 3.1Expression Language Injection in Apache Struts
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.
- Published
- 12 Apr 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security@apache.org
- NVD status
- Modified
- Weakness
- CWE-917
- Also known as
- GHSA-v8j6-6c2r-r27c
- Sources
- NVDJSONOSV GHSA-v8j6-6c2r-r27cJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | apache | strutscpe:2.3:a:apache:struts:*:*:*:*:*:*:*:* |
>= 2.0.0, <= 2.5.29 | |
| OSV | Maven | org.apache.struts:struts2-core | >= 2.0.0, < 2.5.30 | 2.5.30 |
References
- http://www.openwall.com/lists/oss-security/2022/04/12/6 · Mailing List, Mitigation, Third Party Advisory, WEB
- https://cwiki.apache.org/confluence/display/WW/S2-062 · Mitigation, Patch, Vendor Advisory, WEB
- https://security.netapp.com/advisory/ntap-20220420-0001/ · Third Party Advisory, WEB
- https://www.oracle.com/security-alerts/cpujul2022.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-31805 · ADVISORY
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 12 Apr 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 13 Apr 2022)