漏洞描述 S2-012中,包含特制请求参数的请求可用于将任意 OGNL代码注入属性,然后用作重定向地址的请求参数,这将导致进一步评估。当重定向结果从堆栈中读取并使用先前注入的代码作为重定向参数时,将进行第二次评估。这使恶意用户可以将任意OGNL 语句放入由操作公开的任何未过滤的 String 变量中,并将其评估为 OGNL 表达式,以启用方法执行并执行任意方法,从而绕过 Struts 和OGNL 库保护。
相关漏洞推荐 Apache Struts2 S2-067 /index.action 文件上传漏洞(CVE-2024-53677) Apache Struts2 2.0.0~2.2.3 S2-007 /user.action 命令执行漏洞(CVE-2012-0838) POC CVE-2007-4556: OpenSymphony XWork/Apache Struts2 - Remote Code Execution POC CVE-2012-0392: Apache Struts2 S2-008 RCE POC CVE-2013-1965: Apache Struts2 S2-012 RCE POC CVE-2017-12611: Apache Struts2 S2-053 - Remote Code Execution POC CVE-2017-9791: Apache Struts2 S2-053 - Remote Code Execution POC CVE-2017-9805: Apache Struts2 S2-052 - Remote Code Execution POC CVE-2018-11776: Apache Struts2 S2-057 - Remote Code Execution POC CVE-2021-31805: Apache Struts2 S2-062 - Remote Code Execution POC CVE-2007-4556: OpenSymphony XWork/Apache Struts2 - Remote Code Execution S2-001 POC CVE-2012-0392: Apache Struts2 S2-008 RCE POC CVE-2013-1965: Apache Struts2 S2-012 RCE