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

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 85.4%, higher than 99% of CVEs (2026-12-01)
- Published: 2022-04-12T15:25:11.000Z
- Modified: 2026-06-17T03:52:15.950Z
- Also known as: GHSA-v8j6-6c2r-r27c
- Weaknesses: CWE-917
- Assigned by: apache

## 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.

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache Struts: 2.0.0 to 2.5.29
- org.apache.struts:struts2-core (Maven): from 2.0.0 before 2.5.30
- apache struts: from 2.0.0 up to 2.5.29

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://cwiki.apache.org/confluence/display/WW/S2-062> (mitigation, patch, vendor-advisory, web)
- <http://www.openwall.com/lists/oss-security/2022/04/12/6> (mailing-list, mitigation, third-party-advisory, web)
- <https://www.oracle.com/security-alerts/cpujul2022.html> (web)
- <https://security.netapp.com/advisory/ntap-20220420-0001/> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-31805> (advisory)
- <https://security.netapp.com/advisory/ntap-20220420-0001> (web)

## Sources

- CVE List: [CVE-2021-31805](https://www.cve.org/CVERecord?id=CVE-2021-31805), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-v8j6-6c2r-r27c](https://github.com/advisories/GHSA-v8j6-6c2r-r27c), CC-BY-4.0, modified 2024-02-20
- NVD: [CVE-2021-31805](https://nvd.nist.gov/vuln/detail/CVE-2021-31805), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-31805 · Whole record: https://cve.day/CVE-2021-31805.json · Rebuilt by cve.day 2026-11-25T22:58:07.367Z
