.. / CVE-2021-31805

Exploit for Apache Struts2 S2-062 - Remote Code Execution (CVE-2021-31805)

Description:

Apache Struts2 S2-062 is vulnerable to remote code execution. The fix issued for CVE-2020-17530 (S2-061) was incomplete, meaning some of the tag’s attributes could still perform a double evaluation if a developer applied forced OGNL evaluation by using the %{…} syntax.

Nuclei Template

View the template here CVE-2021-31805.yaml

Validate with Nuclei

echo "$URL" | nuclei -t ~/nuclei-templates/http/cves/2021/CVE-2021-31805.yaml
Copy

References:

https://security.netapp.com/advisory/ntap-20220420-0001/
https://cwiki.apache.org/confluence/display/WW/S2-062
http://www.openwall.com/lists/oss-security/2022/04/12/6
https://nvd.nist.gov/vuln/detail/CVE-2021-31805
https://github.com/Axx8/Struts2_S2-062_CVE-2021-31805