CVE-2021-31805

CRITICALNVD 9.89.8
EchelonGraph scoreMEDIUM confidence

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).

Triggered by: NVD CVSS baseline
Sources: epss, nvd
Elevated
9.8
EchelonGraph verdictPatch this weekExploitation is likely or a public exploit exists.
  • High exploitation likelihood — EPSS 85%
CISA-KEV: Not listedEPSS: 85%CVSS: 9.8Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

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.

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 computed
Severity98% × 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, 2026
No patch confirmed yet.
generic

S2-062 - Apache Struts 2 Wiki - Apache Software Foundation

https://cwiki.apache.org/confluence/display/WW/S2-062
generic

oss-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/6

Affected Packages

(1 across 1 ecosystem)
Maven(1)
PackageVulnerable rangeFixed inDependents
org.apache.struts:struts2-core2.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.

  1. 2026-07-23 02:00 UTCEG score recompute
  2. 2026-07-22 22:47 UTCEG score recompute
  3. 2026-07-22 14:06 UTCEPSS rescore
  4. 2026-07-22 14:06 UTCEPSS rescore
  5. 2026-07-20 17:05 UTCEPSS rescore
  6. 2026-07-18 10:02 UTCEPSS rescore
  7. 2026-07-18 10:02 UTCEPSS rescore
  8. 2026-07-15 16:55 UTCEPSS rescore
  9. 2026-07-13 06:10 UTCEPSS rescore
  10. 2026-07-13 04:37 UTCOSV refresh
  11. 2026-07-09 19:07 UTCEPSS rescore
  12. 2026-07-05 02:28 UTCEPSS rescore
  13. 2026-07-05 02:28 UTCEPSS rescore
  14. 2026-07-01 15:04 UTCEPSS rescore
  15. 2026-06-29 14:04 UTCEPSS rescore
  16. 2026-06-28 04:54 UTCEPSS rescore
  17. 2026-06-28 04:54 UTCEPSS rescore
  18. 2026-06-25 13:48 UTCEPSS rescore
  19. 2026-06-25 13:48 UTCEPSS rescore
  20. 2026-06-24 15:01 UTCOSV refresh
  21. 2026-06-23 21:31 UTCEPSS rescore
  22. 2026-06-23 21:31 UTCEPSS rescore
  23. 2026-06-17 17:51 UTCEPSS rescore
  24. 2026-06-15 17:46 UTCEPSS rescore
  25. 2026-06-10 13:20 UTCEPSS rescore
Show 13 more
  1. 2026-06-07 18:46 UTCOSV refresh
  2. 2026-06-06 13:46 UTCEPSS rescore
  3. 2026-06-06 13:46 UTCEPSS rescore
  4. 2026-06-06 13:46 UTCEPSS rescore
  5. 2026-06-05 22:45 UTCEPSS rescore
  6. 2026-05-31 00:15 UTCEPSS rescore
  7. 2026-05-31 00:15 UTCEPSS rescore
  8. 2026-05-27 13:39 UTCEPSS rescore
  9. 2026-05-27 13:39 UTCEPSS rescore
  10. 2026-05-27 13:39 UTCEPSS rescore
  11. 2026-05-26 07:17 UTCEPSS rescore
  12. 2026-05-26 07:17 UTCEPSS rescore
  13. 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-31805
    First seen Jul 10, 2022

    S2-061/S2-062 Struts2 远程命令执行漏洞 POC&EXP

    Open source ↗
  • GitHub PoCpyroxenites/s2-062
    First seen Apr 15, 2022

    远程代码执行S2-062 CVE-2021-31805验证POC

    Open source ↗
  • GitHub PoCaeyesec/CVE-2021-31805
    First seen Apr 15, 2022

    PoC for CVE-2021-31805 (Apache Struts2)

    Open source ↗
  • Nucleihttp/cves/2021/CVE-2021-31805.yaml
    First seen Jan 1, 2021

    Apache Struts2 S2-062 - Remote Code Execution

    Open source ↗

Frequently asked(5)

What is CVE-2021-31805?
CVE-2021-31805 is a critical vulnerability published on April 12, 2022. 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…
When was CVE-2021-31805 disclosed?
CVE-2021-31805 was first published in the National Vulnerability Database on April 12, 2022, with the most recent update on November 21, 2024. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2021-31805 actively exploited?
CVE-2021-31805 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 99.7% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2021-31805?
CVE-2021-31805 has a CVSS v3 base score of 9.8 (NVD).
How do I remediate CVE-2021-31805?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2021-31805, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-31805

Explore →

Is Your Infrastructure Affected by CVE-2021-31805?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.