CVE-2021-31805
Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.
- Published
- Apr 12, 2022
- Updated
- Aug 3, 2024
- Assigning CNA
- apache
- Evidence observed
- Aug 25, 2026
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HHigh · next 30 days
- Percentile
- 99.7%
- Model date
- Sep 21, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
Summary
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.
Sources
8Proof-of-concept exploit for Apache Struts2 RCE (CVE-2021-31805) with Docker setup and curl-based exploitation steps.
- CVE-2021-31805-POCScanner
Apache Struts2 S2-062 (CVE-2021-31805) Remote Code Execution Batch Detection (No Exploitation)
Python exploit for Apache Struts2 S2-062 (CVE-2021-31805) remote code execution, with Docker-based reproduction environment and reverse shell payload generation.
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.