Cyber Resilience

CVE-2021-31805

RCE in Apache Struts 2.0.0 – 2.5.29

High EPSSRCE
Published
12 April 2022
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.85 99.7th percentile
Risk Priority 97 floored blend · peak EPSS

Summary

CVE-2021-31805 is a critical-severity Expression Language Injection (CWE-917) vulnerability in Apache Struts. Its CVSS base score is 9.8 (Critical).

Operationally, ranked in the top 0.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

evaluation on untrusted user input can lead to a Remote Code Execution and security degradation.

CWE(s)

Related Threats

Likely ATT&CK TechniquesAI

Techniques this vulnerability likely enables, inferred from its description, weakness type, and attributed-actor tradecraft. Confidence is per-technique.

T1190 Exploit Public-Facing Application Initial Accessconfidence: HIGH
Double OGNL evaluation on untrusted input in Struts tags enables direct RCE against a public-facing web application.
T1059 Command and Scripting Interpreter Executionconfidence: HIGH
Successful exploitation executes arbitrary OGNL expressions, providing command/script interpreter access on the server.
T1068 Exploitation for Privilege Escalation Privilege Escalationconfidence: MEDIUM
RCE achieved via the web application can be leveraged to escalate privileges on the underlying host.
inferred from description + CWE · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2024-53677Same product: Apache Struts
CVE-2017-12611Same product: Apache Struts
CVE-2023-34149Same product: Apache Struts
CVE-2016-3087Same product: Apache Struts
CVE-2023-34396Same product: Apache Struts
CVE-2017-9791Same product: Apache Struts
CVE-2013-2115Same product: Apache Struts
CVE-2012-0391Same product: Apache Struts
CVE-2023-41835Same product: Apache Struts
CVE-2023-50164Same product: Apache Struts

Affected Assets

apache
struts
2.0.0 — 2.5.29

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.1.2
  • V1.3.2
  • V1.3.5
  • V4.3.1

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require input neutralization and safe EL construction to prevent injection flaws.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing in development and acceptance can detect EL injection but does not itself implement the fix.

prevents

Secure SDLC mandates input validation and output encoding that directly prevent expression-language injection.

prevents

Application security requirements explicitly call for controls against injection flaws including EL injection.

prevents

Secure architecture principles reduce the attack surface but do not prescribe the specific neutralization techniques needed.

prevents

Secure coding standards require proper escaping and parameterization of expression-language statements.

References