lem0n817

Results 3 comments of lem0n817

This function is a dedicated place in the SeaCMS backend to execute sql code, so no filtering restrictions are possible.

### **Summary** SeaCMS v13.1 在 `"admin\admin_reslib.php"` 文件中存在SSRF漏洞,攻击者进入后台后可以利用该漏洞触发Server-Side Request Forgery。 ### Detail #### admin_reslib.php 第75和第77行的`cget`函数为漏洞的入口点,第一次请求携带了`weburl`参数和`isref`,第二次请求携带了`weburl`参数和`0`。 ![1](https://github.com/user-attachments/assets/cf306619-8e08-4a1e-9c2c-d332bd55aca0) `isref`在第38行被赋予了`1` ![2](https://github.com/user-attachments/assets/031279fc-32b9-40ac-9ee6-faa964af6f81) #### filter.inc.php 我发现了如下包含关系 ``` admin_reslib.php->config.php->common.php->filter.inc.php ``` 在`filter.inc.php`37~44行中,可以看到HTTP请求的参数被赋给了同名变量,这得以使用HTTP请求来给url赋值。而`$url=>$var_url=>$weburl`,所以cget的`weburl`可以被用户控制它的值。 ![3](https://github.com/user-attachments/assets/0d520d49-f002-49b1-b5d6-995b7d281f11) #### common.file.func.php 接下来看`include\common.file.func.php`,函数`cget`的定义在这个文件中: ![4](https://github.com/user-attachments/assets/dace4b9f-3326-422e-83c7-4859136125a0) 由于前面所说的,执行了两次cget,第一次`$isref=1`,第二次`$isref=2`,所以`getRemoteContent`和`get`都被执行了一次。...