| 标题 | RCE in easyii |
|---|
| 描述 | insecure file upload lead to rce in admin file upload management within below file
https://github.com/noumo/easyii/blob/ef522fc952675e910e8dd7ed83af29da1381c830/helpers/Upload.php
Code block:
public static function file(UploadedFile $fileInstance, $dir = '', $namePostfix = true)
{
$fileName = Upload::getUploadPath($dir) . DIRECTORY_SEPARATOR . Upload::getFileName($fileInstance, $namePostfix);
if(!$fileInstance->saveAs($fileName)){
throw new HttpException(500, 'Cannot upload file "'.$fileName.'". Please check write permissions.');
}
return Upload::getLink($fileName);
}
1. login to easyii
2. goto to file upload management
3. direct uplaod a php webshell like c99
|
|---|
| 用户 | rezaduty (UID 10530) |
|---|
| 提交 | 2022-10-31 10時19分 (4 年前) |
|---|
| 管理 | 2022-10-31 14時30分 (4 hours later) |
|---|
| 状态 | 已接受 |
|---|
| VulDB条目 | 212501 [easyii CMS File Upload Management helpers/Upload.php file 权限提升] |
|---|
| 积分 | 13 |
|---|