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
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 FencerVendor 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 strutsnot 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
-
cwiki.apache.org
/confluence/display/WW/S2-062
web, mitigation, patch, vendor-advisory
-
openwall.com
/lists/oss-security/2022/04/12/6
mailing-list, web, mitigation, third-party-advisory
-
oracle.com
/security-alerts/cpujul2022.html
web
-
security.netapp.com
/advisory/ntap-20220420-0001/
third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-31805
advisory
-
security.netapp.com
/advisory/ntap-20220420-0001
web
Sources
- CVE List CVE-2021-31805
- GitHub Advisory GHSA-v8j6-6c2r-r27c
- NVD CVE-2021-31805
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.