Skip to content
Fencer Intel
critical 9.8

CVE-2021-31805 in the critical feed json

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

published 4y ago modified 4mo ago also GHSA-v8j6-6c2r-r27c , EUVD-2022-1835

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
85.4%
EPSS 85.4% chance of exploitation in 30 days, percentile 99.7%
public exploits
0
none known, plus a Nuclei check

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.

Patch / fix

  • maven org.apache.struts:struts2-core 2.5.30

Is CVE-2021-31805 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-31805 updated cvss 8.1

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

  • Red Hat JBoss Fuse 6 struts struts Red Hat JBoss Fuse Service Works 6 struts struts Red Hat JBoss Operations Network 3 struts struts
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

85.43% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • Nuclei template Apache Struts2 S2-062 - Remote Code Execution nuclei detection template

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.apache.struts:struts2-core
>=2.0.0, <2.5.30
2.5.30

Affected products

  • Apache Software Foundation Apache Struts

Classification

Weakness
  • CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.