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.
CVE-2021-31805
This critical-severity CVE scores 9.8 under NVD CVSS v3. EPSS exploit probability: 85.3%, top 0% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High exploitation likelihood — EPSS 85%
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 9.8
- EG Score
- 9.8(medium)
- EG Risk
- 83(Track*)EG Risk 83/100SSVC: Track*
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity98% × 45%Exploitation85% × 40%Automatability30% × 15%Action: Watch closely — could escalate to Attend. - EPSS
- 99.7%
- KEV
- Not listed
Published
April 12, 2022
Last Modified
November 21, 2024
Advisory Details (3)
Auto-updated Jul 13, 2026S2-062 - Apache Struts 2 Wiki - Apache Software Foundation
https://cwiki.apache.org/confluence/display/WW/S2-062oss-security - CVE-2021-31805: Apache Struts: Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
http://www.openwall.com/lists/oss-security/2022/04/12/6Affected Packages
(1 across 1 ecosystem)
Maven(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| org.apache.struts:struts2-core | 2.0.11 ... 2.5.8 (82 versions) | 2.5.30 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 7× in last 7d / 22× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-23 02:00 UTCEG score recompute
- 2026-07-22 22:47 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-13 04:37 UTCOSV refresh
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-24 15:01 UTCOSV refresh
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
Show 13 moreShow fewer
- 2026-06-07 18:46 UTCOSV refresh
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-23 08:50 UTCEG score recompute
Publicly available exploits
(4 references)Working exploit code is in the public domain (3 GitHub PoCs). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCz92g/CVE-2021-31805First seen Jul 10, 2022
S2-061/S2-062 Struts2 远程命令执行漏洞 POC&EXP
Open source ↗ - GitHub PoCpyroxenites/s2-062First seen Apr 15, 2022
远程代码执行S2-062 CVE-2021-31805验证POC
Open source ↗ - GitHub PoCaeyesec/CVE-2021-31805First seen Apr 15, 2022
PoC for CVE-2021-31805 (Apache Struts2)
Open source ↗ - Nucleihttp/cves/2021/CVE-2021-31805.yamlFirst seen Jan 1, 2021
Apache Struts2 S2-062 - Remote Code Execution
Open source ↗
Frequently asked(5)
What is CVE-2021-31805?
When was CVE-2021-31805 disclosed?
Is CVE-2021-31805 actively exploited?
What is the CVSS score of CVE-2021-31805?
How do I remediate CVE-2021-31805?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-31805
Is Your Infrastructure Affected by CVE-2021-31805?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.