漏洞概述 该漏洞存在于 Apache Struts 2 框架中,具体为 S2-046 漏洞。攻击者可以通过构造恶意的 HTTP 请求,利用 Struts 2 的 参数注入 OGNL 表达式,从而在服务器上执行任意命令。 影响范围 受影响版本:Apache Struts 2.3.5 - Struts 2.3.31, Struts 2.5 - Struts 2.5.10 漏洞类型:远程代码执行 (RCE) 触发条件:攻击者需要能够控制 HTTP 请求中的 头部。 修复方案 升级版本:升级到 Apache Struts 2.3.32 或 Struts 2.5.10.1 及以上版本。 临时缓解措施:如果无法立即升级,可以通过配置 Web 服务器(如 Apache HTTP Server 或 Nginx)来限制或过滤 头部的值,防止其包含恶意 OGNL 表达式。 POC 代码