CVE-2021-31805: The fix issued for CVE-2020-17530 was incomplete
CVE-2021-31805 is a critical-severity flaw (CVSS 9.8) affecting struts. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- EPSS top 1%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
- On your watchlist
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 85.4% (top 1%) |
| CISA exploited list | No |
| Weakness | CWE-917 |
| Published | 2022-04-12 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: pyroxenites/s2-062 (131 stars)
- GitHub PoC: Wrin9/CVE-2021-31805 (37 stars)
- GitHub PoC: jax7sec/S2-062 (23 stars)
- Write-up: www.oracle.com/security-alerts/cpujul2022.html
- GitHub PoC: 3SsFuck/CVE-2021-31805-POC
- GitHub PoC: Axx8/Struts2_S2-062_CVE-2021-31805
- Nuclei scan template: Apache Struts2 S2-062 - Remote Code Execution
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-31805?
struts: upgrade to newer than 2.5.29. Exact commands for each OS are on this page.
Is CVE-2021-31805 being exploited?
CVE-2021-31805 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-31805 affect?
CVE-2021-31805 affects struts. Severity is critical (CVSS 9.8). 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 fo
How urgent is CVE-2021-31805?
Priority 74/100. Critical severity; EPSS top 1%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action; On your watchlist
Software pages
Related CVEs
- CVE-2024-53677 CRITICAL 9.8 UPGRADE File upload logic in Apache Struts is flawed. An attacker can manipulate file upload params to enable paths tr
- CVE-2016-1182 HIGH 8.2 DOWNGRADE ActionServlet.java in Apache Struts 1 1.x through 1.3.10 does not properly restrict the Validator configuratio
- CVE-2016-1181 HIGH 8.1 DOWNGRADE DOWNGRADE ActionServlet.java in Apache Struts 1 1.x through 1.3.10 mishandles multithreaded access to an ActionForm inst
- CVE-2025-66675 HIGH 8.2 UPGRADE Denial of Service vulnerability in Apache Struts, file leak in multipart request processing causes disk exhaus
- CVE-2014-0114 HIGH 7.5 UPGRADE DOWNGRADE Apache Commons BeanUtils, as distributed in lib/commons-beanutils-1.8.0.jar in Apache Struts 1.x through 1.3.1