{"id":"CVE-2021-31805","aliases":["EUVD-2022-1835","GHSA-v8j6-6c2r-r27c"],"status":"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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.85433,"percentile":0.99724,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-917"],"published":"2022-04-12T15:25:11Z","modified":"2026-10-24T10:30:47Z","exploits":[{"source":"nuclei","id":"CVE-2021-31805","title":"Apache Struts2 S2-062 - Remote Code Execution","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-31805.yaml"},{"source":"pocgithub","id":"JordanANDJohn/CVE-2021-31805-POC","title":"JordanANDJohn/CVE-2021-31805-POC","date":"2022-04-18","url":"https://github.com/JordanANDJohn/CVE-2021-31805-POC"},{"source":"pocgithub","id":"SecNN/Struts2_S2-062_CVE-2021-31805","title":"SecNN/Struts2_S2-062_CVE-2021-31805","date":"2022-04-15","url":"https://github.com/SecNN/Struts2_S2-062_CVE-2021-31805"},{"source":"pocgithub","id":"Wrin9/CVE-2021-31805","title":"Wrin9/CVE-2021-31805","date":"2022-04-15","url":"https://github.com/Wrin9/CVE-2021-31805"},{"source":"pocgithub","id":"aeyesec/CVE-2021-31805","title":"aeyesec/CVE-2021-31805","date":"2022-04-15","url":"https://github.com/aeyesec/CVE-2021-31805"},{"source":"pocgithub","id":"jax7sec/S2-062","title":"jax7sec/S2-062","date":"2022-04-15","url":"https://github.com/jax7sec/S2-062"},{"source":"pocgithub","id":"nth347/struts2-CVE-2021-31805","title":"nth347/struts2-CVE-2021-31805","date":"2023-08-04","url":"https://github.com/nth347/struts2-CVE-2021-31805"},{"source":"pocgithub","id":"pyroxenites/s2-062","title":"pyroxenites/s2-062","date":"2022-04-15","url":"https://github.com/pyroxenites/s2-062"},{"source":"pocgithub","id":"z92g/CVE-2021-31805","title":"z92g/CVE-2021-31805","date":"2022-07-10","url":"https://github.com/z92g/CVE-2021-31805"}],"fixes":[{"ecosystem":"Maven","package":"org.apache.struts:struts2-core","fixed_in":["2.5.30"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.apache.struts:struts2-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.5.30"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.apache.struts:struts2-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.5.30"}]}],"versions":["2.0.11","2.0.11.1","2.0.11.2","2.0.12","2.0.14","2.0.5","2.0.6","2.0.8","2.0.9","2.1.2","2.1.6","2.1.8","2.1.8.1","2.2.1","2.2.1.1","2.2.3","2.2.3.1","2.3.1","2.3.1.1","2.3.1.2","2.3.12","2.3.14","2.3.14.1","2.3.14.2","2.3.14.3","2.3.15","2.3.15.1","2.3.15.2","2.3.15.3","2.3.16","2.3.16.1","2.3.16.2","2.3.16.3","2.3.20","2.3.20.1","2.3.20.3","2.3.24","2.3.24.1","2.3.24.3","2.3.28","2.3.28.1","2.3.29","2.3.3","2.3.30","2.3.31","2.3.32","2.3.33","2.3.34","2.3.35","2.3.36","2.3.37","2.3.4","2.3.4.1","2.3.7","2.3.8","2.5","2.5-BETA1","2.5-BETA2","2.5-BETA3","2.5.1","2.5.10","2.5.10.1","2.5.12","2.5.13","2.5.14","2.5.14.1","2.5.16","2.5.17","2.5.18","2.5.2","2.5.20","2.5.22","2.5.25","2.5.26","2.5.27","2.5.28","2.5.28.1","2.5.28.2","2.5.28.3","2.5.29","2.5.5","2.5.8"]}],"products":[{"vendor":"apache","product":"struts"},{"vendor":"apache software foundation","product":"apache struts"}],"references":[{"url":"https://cwiki.apache.org/confluence/display/WW/S2-062","tags":["x_refsource_MISC","x_transferred","Mitigation","Patch","Vendor Advisory","fix","web"]},{"url":"http://www.openwall.com/lists/oss-security/2022/04/12/6","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://security.netapp.com/advisory/ntap-20220420-0001/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31805","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-v8j6-6c2r-r27c"},{"url":"https://security.netapp.com/advisory/ntap-20220420-0001","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-31805","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.","status":"published","published":"2022-04-12T15:25:11Z","modified":"2024-08-03T23:10:30.193Z","cwes":["CWE-917"],"updated_at":"2026-11-02T14:33:05.665371Z"}],"euvd":[{"id":"EUVD-2022-1835","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.","status":"published","published":"2022-04-12T15:25:11Z","modified":"2024-08-03T23:10:30Z","updated_at":"2026-11-03T03:24:37.97373Z"}],"ghsa":[{"id":"GHSA-v8j6-6c2r-r27c","title":"Expression Language Injection in Apache Struts","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.","status":"published","published":"2022-04-13T00:00:30Z","modified":"2023-01-27T05:03:07Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-917"],"updated_at":"2026-11-02T14:36:20.144464Z"}],"nvd":[{"id":"CVE-2021-31805","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.","status":"published","published":"2022-04-12T16:15:08.133Z","modified":"2026-06-17T03:52:15.95Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-917"],"updated_at":"2026-11-02T14:07:05.581807Z"}],"osv":[{"id":"CVE-2021-31805","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.","status":"published","published":"2022-04-12T16:15:08.133Z","modified":"2026-10-24T10:30:47.030600228Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:19.483607Z"},{"id":"GHSA-v8j6-6c2r-r27c","title":"Expression Language Injection in Apache Struts","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.","status":"published","published":"2022-04-13T00:00:30Z","modified":"2024-02-20T05:22:46.45499Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-917"],"updated_at":"2026-11-02T15:46:56.981655Z"}]}}
