{"id":"CVE-2021-31805","state":"PUBLISHED","title":"Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.","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.","publishedAt":"2022-04-12T15:25:11.000Z","updatedAt":"2024-08-03T23:10:30.193Z","severity":null,"assigner":"apache","products":["Apache Software Foundation Apache Struts"],"affected":[{"vendor":"Apache Software Foundation","product":"Apache Struts","versions":[{"version":"2.0.0 to 2.5.29","status":"affected"}]}],"references":["https://cwiki.apache.org/confluence/display/WW/S2-062","http://www.openwall.com/lists/oss-security/2022/04/12/6","https://www.oracle.com/security-alerts/cpujul2022.html","https://security.netapp.com/advisory/ntap-20220420-0001/"],"weaknesses":["CWE-917"],"ingestedAt":"2026-10-29T19:48:30.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/31xxx/CVE-2021-31805.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-31805","state":"PUBLISHED","datePublished":"2022-04-12T15:25:11.000Z","dateUpdated":"2024-08-03T23:10:30.193Z","assignerShortName":"apache","assignerOrgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","dateReserved":"2021-04-26T00:00:00.000Z"},"containers":{"cna":{"title":"Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE.","descriptions":[{"lang":"en","value":"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":[{"vendor":"Apache Software Foundation","product":"Apache Struts","versions":[{"version":"2.0.0 to 2.5.29","status":"affected"}]}],"references":[{"url":"https://cwiki.apache.org/confluence/display/WW/S2-062","tags":["x_refsource_MISC"]},{"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"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20220420-0001/","tags":["x_refsource_CONFIRM"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-917","description":"CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"apache","dateUpdated":"2022-07-25T16:27:57.000Z","orgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09"},"credits":[{"lang":"en","value":"Apache Struts would like to thank Chris McCown for reporting this issue!"}],"source":{"discovery":"UNKNOWN"},"workarounds":[{"lang":"en","value":"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.\n\nPlease read our Security Bulletin S2-062 for more details."}],"x_generator":{"engine":"Vulnogram 0.0.9"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security@apache.org","ID":"CVE-2021-31805","STATE":"PUBLIC","TITLE":"Forced OGNL evaluation, when evaluated on raw not validated user input in tag attributes, may lead to RCE."},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"Apache Struts","version":{"version_data":[{"version_value":"2.0.0 to 2.5.29"}]}}]},"vendor_name":"Apache Software Foundation"}]}},"credit":[{"lang":"eng","value":"Apache Struts would like to thank Chris McCown for reporting this issue!"}],"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"generator":{"engine":"Vulnogram 0.0.9"},"impact":[{}],"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')"}]}]},"references":{"reference_data":[{"name":"https://cwiki.apache.org/confluence/display/WW/S2-062","refsource":"MISC","url":"https://cwiki.apache.org/confluence/display/WW/S2-062"},{"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.","refsource":"MLIST","url":"http://www.openwall.com/lists/oss-security/2022/04/12/6"},{"name":"https://www.oracle.com/security-alerts/cpujul2022.html","refsource":"MISC","url":"https://www.oracle.com/security-alerts/cpujul2022.html"},{"name":"https://security.netapp.com/advisory/ntap-20220420-0001/","refsource":"CONFIRM","url":"https://security.netapp.com/advisory/ntap-20220420-0001/"}]},"source":{"discovery":"UNKNOWN"},"work_around":[{"lang":"en","value":"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.\n\nPlease read our Security Bulletin S2-062 for more details."}]}},"adp":[{"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":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T23:10:30.193Z"}}]}}}