CVE-2021-31805
CVE-2021-31805 is a critical-severity vulnerability in Apache Struts with a CVSS 3.x base score of 9.8. Its EPSS exploit-prediction score of 85% places it in the 100th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-917.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 7.5
- EPSS exploit prediction: 85% (100th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-917
- Affected product: Apache Struts
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2021-31805?
- 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.
- How severe is CVE-2021-31805?
- CVE-2021-31805 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2021-31805 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 85% (100th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-31805?
- CVE-2021-31805 affects Apache Struts. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-31805?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2021-31805 published?
- CVE-2021-31805 was published on 2022-04-12 and last updated on 2026-06-17.
References
- http://www.openwall.com/lists/oss-security/2022/04/12/6
- https://cwiki.apache.org/confluence/display/WW/S2-062
- https://security.netapp.com/advisory/ntap-20220420-0001/
- https://www.oracle.com/security-alerts/cpujul2022.html
Affected products (1)
- cpe:2.3:a:apache:struts:*:*:*:*:*:*:*:*
More vulnerabilities in Apache Struts
- CVE-2013-4316 — Critical (CVSS 10.0): Apache Struts 2.0.0 through 2.3.15.1 enables Dynamic Method Invocation by default, which has unknown impact and attack…
- CVE-2012-0838 — Critical (CVSS 10.0): Apache Struts 2 before 2.2.3.1 evaluates a string as an OGNL expression during the handling of a conversion error,…
- CVE-2024-53677 — Critical (CVSS 9.8): File upload logic in Apache Struts is flawed. An attacker can manipulate file upload params to enable paths traversal…
- CVE-2023-50164 — Critical (CVSS 9.8): An attacker can manipulate file upload params to enable paths traversal and under some circumstances this can lead to…
- CVE-2020-17530 — Critical (CVSS 9.8): Forced OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution. Affected…
- CVE-2019-0230 — Critical (CVSS 9.8): Apache Struts 2.0.0 to 2.5.20 forced double OGNL evaluation, when evaluated on raw user input in tag attributes, may…
All CVEs affecting Apache Struts →
Other CWE-917 vulnerabilities
- CVE-2025-3322 — Critical (CVSS 10.0): An improper neutralization of inputs used in expression language allows remote code execution with the highest…
- CVE-2022-22947 — Critical (CVSS 10.0): In spring cloud gateway versions prior to 3.1.1+ and 3.0.7+ , applications are vulnerable to a code injection attack…
- CVE-2026-11561 — Critical (CVSS 9.8): Improper neutralization of special elements used in an expression language statement ('expression language injection')…
- CVE-2026-22738 — Critical (CVSS 9.8): In Spring AI, a SpEL injection vulnerability exists in SimpleVectorStore when a user-supplied value is used as a…
- CVE-2026-24713 — Critical (CVSS 9.8): Improper Input Validation vulnerability in Apache IoTDB. This issue affects Apache IoTDB: from 1.0.0 before 1.3.7,…
- CVE-2023-51593 — Critical (CVSS 9.8): Voltronic Power ViewPower Pro Expression Language Injection Remote Code Execution Vulnerability. This vulnerability…