CVE-2021-31805
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 85.433% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T18:36:01.564Z. Public exploit availability is not used to set this status.
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T18:36:01.564Z | CISA KEV |
| cvss | unknown | unknown | unknown |
| epss | verified | 2026-11-19T18:27:06.173Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:13.641Z | OSV |
| affected | verified | 2026-11-19T12:55:58.310Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:55:58.310Z | CVE Program |
Affected versions and configuration
Apache Software Foundation Apache Struts; default status: unknown: 2.0.0 to 2.5.29 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "Apache Software Foundation",
"product": "Apache Struts",
"versions": [
{
"status": "affected",
"version": "2.0.0 to 2.5.29"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://cwiki.apache.org/confluence/display/WW/S2-062",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
},
{
"url": "http://www.openwall.com/lists/oss-security/2022/04/12/6",
"name": "[oss-security] 20220412 CVE-2021-31805: Apache Struts: Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.",
"tags": [
"mailing-list",
"x_refsource_MLIST",
"x_transferred"
]
},
{
"url": "https://www.oracle.com/security-alerts/cpujul2022.html",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
},
{
"url": "https://security.netapp.com/advisory/ntap-20220420-0001/",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-03T23:10:30.193Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-v8j6-6c2r-r27c",
"aliases": [
"CVE-2021-31805"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.5.30"
}
]
}
],
"package": {
"name": "org.apache.struts:struts2-core",
"purl": "pkg:maven/org.apache.struts/struts2-core",
"ecosystem": "Maven"
},
"versions": [
"2.0.11",
"2.0.11.1",
"2.0.11.2",
"2.0.12",
"2.0.14",
"2.0.5",
"2.0.6",
"2.0.8",
"2.0.9",
"2.1.2",
"2.1.6",
"2.1.8",
"2.1.8.1",
"2.2.1",
"2.2.1.1",
"2.2.3",
"2.2.3.1",
"2.3.1",
"2.3.1.1",
"2.3.1.2",
"2.3.12",
"2.3.14",
"2.3.14.1",
"2.3.14.2",
"2.3.14.3",
"2.3.15",
"2.3.15.1",
"2.3.15.2",
"2.3.15.3",
"2.3.16",
"2.3.16.1",
"2.3.16.2",
"2.3.16.3",
"2.3.20",
"2.3.20.1",
"2.3.20.3",
"2.3.24",
"2.3.24.1",
"2.3.24.3",
"2.3.28",
"2.3.28.1",
"2.3.29",
"2.3.3",
"2.3.30",
"2.3.31",
"2.3.32",
"2.3.33",
"2.3.34",
"2.3.35",
"2.3.36",
"2.3.37",
"2.3.4",
"2.3.4.1",
"2.3.7",
"2.3.8",
"2.5",
"2.5-BETA1",
"2.5-BETA2",
"2.5-BETA3",
"2.5.1",
"2.5.10",
"2.5.10.1",
"2.5.12",
"2.5.13",
"2.5.14",
"2.5.14.1",
"2.5.16",
"2.5.17",
"2.5.18",
"2.5.2",
"2.5.20",
"2.5.22",
"2.5.25",
"2.5.26",
"2.5.27",
"2.5.28",
"2.5.28.1",
"2.5.28.2",
"2.5.28.3",
"2.5.29",
"2.5.5",
"2.5.8"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/04/GHSA-v8j6-6c2r-r27c/GHSA-v8j6-6c2r-r27c.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-31805",
"type": "ADVISORY"
},
{
"url": "https://cwiki.apache.org/confluence/display/WW/S2-062",
"type": "WEB"
},
{
"url": "https://security.netapp.com/advisory/ntap-20220420-0001",
"type": "WEB"
},
{
"url": "https://www.oracle.com/security-alerts/cpujul2022.html",
"type": "WEB"
},
{
"url": "http://www.openwall.com/lists/oss-security/2022/04/12/6",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-917"
],
"severity": "CRITICAL",
"github_reviewed": true,
"nvd_published_at": "2022-04-12T16:15:00Z",
"github_reviewed_at": "2022-04-22T20:30:35Z"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | Maven / package | org.apache.struts:struts2-core | Not a distribution channel | 2.5.30 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- FIRST EPSSConsulted: 2026-11-19T18:27:06.173ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
8b22e3d0bbbe22a3c52f8c688c42204480fc90c949431dad186ebe9ca81245a8 - OSVConsulted: 2026-11-19T12:52:13.641ZArchived source JSON
Source publication: 2022-04-13T00:00:30.000Z
Source modification: 2024-02-20T05:22:46.454ZDocument fingerprint
5a53c5a93867bdc60024ed21c6f3fa085588b63660a4b64cc3c19a37bf249eb0 - CVE ProgramConsulted: 2026-11-19T12:55:58.310ZArchived source JSON
Source publication: 2022-04-12T15:25:11.000Z
Source modification: 2024-08-03T23:10:30.193ZDocument fingerprint
cffb447a60f3b7b22c5c6c80f06fe8796416f8f3eb0a755a18abc7dae379fb38 - CISA KEVConsulted: 2026-11-19T18:36:01.564ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56
Official status history
- UNKNOWN → PUBLISHED · · evidence