CVE-2021-31805
Confirmed PUBLISHEDForced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
Not yet in CISA KEV
Recommended Action
Prioritize immediate patching and validate internet-facing exposure. Monitor for matching exploitation attempts in your environment.
At a Glance
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 Published
- Apr 12, 2022
- Exploitation Reported
- Jun 12, 2026
- CVSS
- 9.8 Critical
- EPSS
- 85.3%
Affected Versions
| Vendor | Product | Version | Status |
|---|---|---|---|
| Apache Software Foundation |
Apache Struts
|
2.0.0 to 2.5.29 |
Affected |
CVE References
- [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. openwall.com · Mailing List http://www.openwall.com/lists/oss-security/2022/04/12/6
- cwiki.apache.org/confluence/display/WW/S2-062 cwiki.apache.org · CVE Record https://cwiki.apache.org/confluence/display/WW/S2-062
- oracle.com/security-alerts/cpujul2022.html oracle.com · CVE Record https://www.oracle.com/security-alerts/cpujul2022.html
- security.netapp.com/advisory/ntap-20220420-0001 security.netapp.com · CVE Record https://security.netapp.com/advisory/ntap-20220420-0001/
Recommended Actions
- Prioritize immediate patching and validate internet-facing exposure. Monitor for matching exploitation attempts in your environment.
- Review sensor telemetry for request paths, attacker IPs, and payload patterns that may inform detection and exposure validation.
- Check enrichment artifacts for scanner coverage and available PoCs before rolling remediation validation.
- Use the Pro API to automate enrichment, telemetry, and workflow delivery for VM, SOC, and CTI pipelines.
Known Exploited Vulnerability Sources
Catalogues that list this CVE as a known exploited vulnerability.
Per-source evidence links for KEV attestations are available through the KEVIntel Pro API.
Learn about Pro API access| Source | Added |
|---|---|
| KEVIntel First | 2026-06-12 00:32 UTC |
Operational indicators for this CVE are listed on the Detection tab.
Observed Exploitation Attempts
Exploitation attempts against this vulnerability observed first-hand by KEVIntel private honeypots over the last 30 days.
- Attempts Observed
- 38
- Unique Attacker IPs
- 19
- Attacker Countries
- 🇨🇿 🇩🇪 🇪🇪 🇪🇬 🇫🇷 🇬🇧 🇮🇪 🇮🇳 🇳🇱 🇸🇬 🇺🇸 🇻🇳
- Sensors Observed
- 3
Exploitation Attempts Over the Last 39 Days
First observed (all time) 2026-06-12 00:32 UTC · Last observed 2026-07-19 02:07 UTC
See more exploitation detail
- Pro — sensor software/region breakdown and 24h/7d window summaries.
- Enterprise — raw attacker IPs, request paths, User-Agents, and payloads.
Indicators of Compromise (IoCs)
Attacker IP IoCs observed in KEVIntel sensors are available to Pro and Enterprise accounts on the Detection tab and through the Pro API.
Learn about Pro API accessObserved Detection Signals (30d)
Aggregate counts from KEVIntel sensor telemetry for this CVE.
- Distinct request paths
- 1
- Distinct User-Agents
- 22
The specific request paths and User-Agents attackers are using are available on Pro and Enterprise plans.
Scanner Artifacts
Nuclei and Metasploit references linked to this CVE.
| Scanner | Reference | Detected |
|---|---|---|
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-31805.yaml | Apr 25, 2025 |
Virtual Patch
Compensating WAF rules to help reduce exposure to this CVE. Rule content and deployable vendor exports are available with KEVIntel Enterprise.
Supported Platforms
Enterprise feature. Virtual patch rule content and deployable vendor exports (ModSecurity, Cloudflare, AWS WAF) are available to KEVIntel Enterprise users.
GET /api/v2/enterprise/virtual_patches?cve_id=CVE-2021-31805
CVSS Scores
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
AV:N/AC:L/Au:N/C:P/I:P/A:P
Exploitation Status
Exploited in the wild
Recorded 2026-06-12 00:32:51 UTC · KEVIntel
Active exploitation observed
Recorded 2026-06-12 00:32:51 UTC · KEVIntel sensor
Proof of concept available
Recorded 2022-04-15 04:23:44 UTC · GitHub
Weaknesses (CWE)
-
Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
Scanner Integrations
| Scanner | Reference | Detected |
|---|---|---|
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-31805.yaml | Apr 25, 2025 |
Potential Proof of Concepts
These PoCs are unverified and could contain malware. Use at your own risk.
github · Created 2022-07-10 14:48:52 UTC · 6 stars
S2-061/S2-062 Struts2 远程命令执行漏洞 POC&EXP
github · Created 2022-04-15 16:09:52 UTC · 5 stars
PoC for CVE-2021-31805 (Apache Struts2)
github · Created 2022-04-15 10:28:29 UTC · 11 stars
Apache Struts2 S2-062远程代码执行漏洞(CVE-2021-31805) | 反弹Shell
github · Created 2022-04-15 04:23:44 UTC · 35 stars
S2-062 (CVE-2021-31805) / S2-061 / S2-059 RCE
nuclei · Created Unknown
Timeline
Key exploitation, disclosure, scanner coverage, and KEV attestation events for this CVE.
-
14:21 UTC 27 days ago14:21 UTC · 27 days ago
Virtual patch available
Compensating WAF rule available to block exploitation
-
00:32 UTC about 1 month ago00:32 UTC · about 1 month ago
Observed by KEVIntel sensors
Evidence-backed exploitation signal
-
00:32 UTC about 1 month ago00:32 UTC · about 1 month ago
Indicators of compromise added (19)
Indicators of compromise recorded
-
00:00 UTC about 1 year ago00:00 UTC · about 1 year ago
Nuclei template available
Scanner coverage available
-
04:23 UTC over 4 years ago04:23 UTC · over 4 years ago
Public PoC available
Public proof-of-concept code published
-
15:25 UTC over 4 years ago15:25 UTC · over 4 years ago
CVE published
Vulnerability disclosed publicly
-
00:00 UTC about 5 years ago00:00 UTC · about 5 years ago
CVE ID reserved
Identifier reserved by the CNA
Automate This Intelligence with the Pro API
Confidence scoring, exploit status, sensor telemetry, PoCs, scanner integrations, mentions, and tags are available programmatically for VM, SOC, and CTI workflows.
Pro API Example
GET /api/v2/pro/kevs/CVE-2021-31805
{
"cve_id": "CVE-2021-31805",
"title": "Forced OGNL evaluation, when evaluated on raw not validated user input in tag...",
"affected_vendor": "Apache Software Foundation",
"affected_product": "Apache Struts",
"affected_versions": [
{ "vendor": "...", "product": "...", "status": "affected", "display_label": "..." }
],
"confidence": "Confirmed",
"cvss_score": 9.8,
"epss_score": 0.85315,
"exploit_status": {
"exploited_in_the_wild": true,
"active_exploitation_observed": true
},
"sensor_telemetry": { "...": "Pro API fields" },
"proof_of_concepts": [ "..." ],
"scanner_integrations": [ "..." ]
}