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

CVE-2021-31805 affects 56 listed versions of Apache Struts in the Dawnsentry catalogue.

9.8CVSS critical
Proof of concept publicexploitation
85%EPSS (next 30 days)
12 April 2022published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Apache Struts

56 of 125 listed versions are affected. No fixed release is named. The newest release, 7.5.1, is not affected.

2.5.29 2.5.28.3 2.5.28.2 2.5.28.1 2.5.28 2.5.27 2.5.26 2.5.25 2.5.24 2.5.23 2.5.22 2.3.37 2.3.36 2.3.35 2.3.34 2.3.33 2.3.32 2.3.31 2.3.30 2.3.29 2.3.28.1 2.3.28 2.3.27 2.3.26 2.3.25 2.3.24.3 2.2.3.1 2.2.3 2.2.1.1 2.2.1 2.1.8.1 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.1 2.0.14 2.0.13 2.0.12 2.0.11.2 2.0.11.1 2.0.11 2.0.10 2.0.9 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2

What it is

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD)

Published by Apache Software Foundation on 12 April 2022. Last changed 17 June 2026. Exploit code is public (Metasploit or Nuclei).

Sources

Check one version you run: look CVE-2021-31805 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.