Vulnerability · Published Apr 12, 2022 · Assigned by apache

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

Critical 9.8

In plain English

A critical-severity expression language injection in Apache Struts from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 85.4% (higher than 99.7% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)9.8Critical
Exploit odds (30 days)85.4%top 0.3% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling2Nuclei, Public PoC

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Mavenorg.apache.struts:struts2-core2.5.30GHSA-v8j6-6c2r-r27c

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache Struts 2.0.0 to 2.5.29

Weakness: CWE-917

References