Patchfirst
CVE-2021-31805 Public exploit EPSS 85.4%

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

Apache Software Foundation · Apache Struts

Official description · CVE.org

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.

Breakdown
62.0 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 29 days after disclosure. Public exploit code (PoC-in-GitHub) appeared 3 days after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+3 days
  3. First seen exploitedVulnCheck KEV evidence+29 days

See the family tree

A fix was bypassed or incomplete once over 16 months. The latest fix listed for struts2-core is 6.1.2.1.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2020-17530Struts Remote Code Execution11 Dec 2020KEV
  2. incomplete fixHigh

    Why these are linked:

    • Stated in the CVE textThe fix issued for CVE-2020-17530 was incomplete.
    • Fixed one release later2.5.26 → 2.5.30 (org.apache.struts:struts2-core)
    • Similar weakness in the same product (machine-matched)same product + CWE + description similarity
    This CVECVE-2021-31805Forced OGNL evaluation, when evaluated on raw not validated user…12 Apr 2022

Fixes in struts2-coreMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.5.22CVE-2019-023014 Sep 2020
  2. 2.5.22CVE-2019-023314 Sep 2020
  3. 2.5.26CVE-2020-1753011 Dec 2020KEV
  4. 2.5.30CVE-2021-3180512 Apr 2022
  5. 6.1.1CVE-2025-6849311 Jan 2026
  6. 6.1.2.1CVE-2023-3414914 Jun 2023
  7. 6.1.2.1CVE-2023-3439614 Jun 2023Latest listed

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.apache.struts:struts2-core.

Mavenorg.apache.struts:struts2-coreGHSA-v8j6-6c2r-r27c

Upgrade to 2.5.33

Fixes this CVE and 23 other known vulnerabilities in this package (CVE-2008-6505, CVE-2010-1870, +21).

Still affected on this line by CVE-2024-53677 (fixed in 6.4.0, a newer line); CVE-2025-68493 (no fix published).

Set the version to 2.5.33 or later in your pom.xml or build.gradle.

First fixed in 2.5.30 for CVE-2021-31805.

Affected versions

If you runUpgrade to
2.0.0 up to 2.5.302.5.33first fix for this CVE: 2.5.30

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close