Every CVE Search/ Get API key

CVE-2021-31805

Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.

9.8 CriticalPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

85.4%Up 78.1 points since Apr 13, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

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.

Record
CVE-2021-31805
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-917
Updated
2026-11-02
CVE List No score

Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.

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.

Record
CVE-2021-31805
Weakness
CWE-917
Updated
2026-11-02
EUVDEUVD-2022-1835 No score

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.

Record
EUVD-2022-1835
Updated
2026-11-03
GitHub AdvisoriesGHSA-v8j6-6c2r-r27c 9.8

Expression Language Injection in Apache Struts

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.

Record
GHSA-v8j6-6c2r-r27c
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-917
Updated
2026-11-02
OSV 9.8

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.

Record
CVE-2021-31805
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-v8j6-6c2r-r27c 9.8

Expression Language Injection in Apache Struts

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.

Record
GHSA-v8j6-6c2r-r27c
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-917
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.apache.struts:struts2-core
Maven
2.0.0 up to 2.5.30
2.5.30
org.apache.struts:struts2-core
Maven
2.0.0 up to 2.5.30, plus listed versions
2.0.112.0.11.12.0.11.22.0.122.0.14
Show 45 moreShow less
2.0.52.0.62.0.82.0.92.1.22.1.62.1.82.1.8.12.2.12.2.1.12.2.32.2.3.12.3.12.3.1.12.3.1.22.3.122.3.142.3.14.12.3.14.22.3.14.32.3.152.3.15.12.3.15.22.3.15.32.3.162.3.16.12.3.16.22.3.16.32.3.202.3.20.12.3.20.32.3.242.3.24.12.3.24.32.3.282.3.28.12.3.292.3.32.3.302.3.312.3.322.3.332.3.342.3.352.3.36
2.5.30

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
NucleiApache Struts2 S2-062 - Remote Code Execution
PoC in GitHubJordanANDJohn/CVE-2021-31805-POC2022-04-18
PoC in GitHubSecNN/Struts2_S2-062_CVE-2021-318052022-04-15
PoC in GitHubWrin9/CVE-2021-318052022-04-15
PoC in GitHubaeyesec/CVE-2021-318052022-04-15
PoC in GitHubjax7sec/S2-0622022-04-15
PoC in GitHubnth347/struts2-CVE-2021-318052023-08-04
PoC in GitHubpyroxenites/s2-0622022-04-15
PoC in GitHubz92g/CVE-2021-318052022-07-10

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, Nuclei, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-31805 is a critical vulnerability (CVSS 9.8) in Apache Struts, published April 12, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 85.4%, the 99th percentile. Fixed in org.apache.struts:struts2-core 2.5.30.

References

This page doesn't list everything

Left out here: 32 versions. The JSON record has them.

MoveEnter Open