CVE-2021-31805
CriticalExploitedExpression Language Injection in Apache Struts
Published Apr 13, 2022 · Updated Jul 9, 2026 · Also known as GHSA-v8j6-6c2r-r27c
Key Facts
Patch immediately- CVE-2021-31805 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting Struts (Apache), org.apache.struts:struts2-core (maven).
- It is exploited in the wild, listed in Industry KEV feed, CIRCL KEV since May 11, 2022. No public exploit code is known.
- EPSS estimates a 85% probability of exploitation in the next 30 days.
- Fixed versions are available, including Struts <=2.5.29, org.apache.struts:struts2-core 2.5.30, Struts 2.5.29.
- Brandefense priority: patch immediately, because it is listed as exploited in the wild.
CVSS v3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
85%
Higher than 99.7% of all scored CVEs
Exploited in the wild
Yes
2 catalog listings
Public exploit code
None known
Get the full CVE-2021-31805 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
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.
Known-Exploited Catalog Listings
| Catalog | Added | Remediation due | Ransomware use |
|---|---|---|---|
| Industry KEV feed | May 11, 2022 | n/a | Not reported |
| CIRCL KEV | Jun 12, 2026 | n/a | Not reported |
Required action: Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
Affected Products
3 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| StrutsApache | >= 2.0.0 to 2.5.29 | 2.5.29 |
| org.apache.struts:struts2-coremaven | >= 2.0.0 | 2.5.30 |
Patched Releases
Struts
<=2.5.29
org.apache.struts:struts2-core
2.5.30
Timeline
Publicly disclosed
Apr 13, 2022
Added to Industry KEV feed
May 11, 2022
Added to CIRCL KEV
Jun 12, 2026
Last updated
Jul 9, 2026
Weakness Type
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
- advisoryGHSA advisory
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2021-31805
- advisoryhttps://security.netapp.com/advisory/ntap-20220420-0001/
- advisory[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.
- patchhttps://cwiki.apache.org/confluence/display/WW/S2-062
FAQ
Common Questions.
The fix issued for CVE-2020-17530 was incomplete.
Affected: Struts (Apache) versions >= 2.0.0 to 2.5.29; org.apache.struts:struts2-core (maven) versions >= 2.0.0. The full list is in the CVE brief.
It is exploited in the wild, listed in Industry KEV feed, CIRCL KEV since May 11, 2022.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including Struts <=2.5.29, org.apache.struts:struts2-core 2.5.30, Struts 2.5.29.
Brandefense priority: patch immediately, because it is listed as exploited in the wild.
Is CVE-2021-31805 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo