CVE-2021-31805Struts Vulnerability
Expression Language Injection in Apache Struts
Published Apr 13, 2022 · Updated Oct 24, 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 CIRCL KEV, Industry KEV feed 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.
Scores
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.8% of all scored CVEs
Exploit maturity
Exploited (KEV)
ATLAS score
68/100
Publication score, see How it works
Exploitation Verdict
KEV listed
May 11, 2022
28 days after publication
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
Exploited (KEV)
Public exploit code
0
Proof-of-concept links
In-the-wild evidence
8
Reports of active use
Advisories And Exploit References
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2021-31805
- advisoryGHSA advisory
- 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
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 |
|---|---|---|---|
| CIRCL KEV | May 11, 2022 | n/a | Not reported |
| Industry KEV feed | May 11, 2022 | n/a | Not reported |
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 CIRCL KEV
May 11, 2022
Added to Industry KEV feed
May 11, 2022
Last updated
Oct 24, 2026
Weakness Type
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement
References
- advisorynvd.nist.gov · CVE-2021-31805
- advisoryGHSA advisory
- advisorysecurity.netapp.com · 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.
- patchcwiki.apache.org · 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 CIRCL KEV, Industry KEV feed 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 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo