CVE-2021-31805

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

Published Apr 12, 2022 CVSS 3.1 · 9.8 Critical EPSS 85.4% KEV · Not listed
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.

Remediation

Vendor Workaround

Avoid using forced OGNL evaluation on untrusted user input, and/or upgrade to Struts 2.5.30 which checks if expression evaluation won’t lead to the double evaluation. Please read our Security Bulletin S2-062 for more details.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v8j6-6c2r-r27c Expression Language Injection in Apache Struts
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Aug 3, 2024, 11:10 PM
Reserved
Apr 26, 2021, 12:00 AM
Status
Modified
Published
Apr 12, 2022, 4:15 PM
Modified
Jun 17, 2026, 3:52 AM
Severity
Important
Public date
Apr 12, 2022, 12:00 AM