POC详情: 00c632a34e9c8833a933597d6c765f2e15979c2a

来源
关联漏洞
标题: WordPress plugin File Manager, Code Editor, and Backup by Managefy 路径遍历漏洞 (CVE-2025-9345)
描述:WordPress和WordPress plugin都是WordPress基金会的产品。WordPress是一套使用PHP语言开发的博客平台。该平台支持在PHP和MySQL的服务器上架设个人博客网站。WordPress plugin是一个应用插件。 WordPress plugin File Manager, Code Editor, and Backup by Managefy 1.4.8及之前版本存在路径遍历漏洞,该漏洞源于路径遍历,可能导致文件操作越界。
描述
CVE-2025-9345
介绍
# Proof of Concept Path Traversal in File Manager, Code Editor, and Backup by Managefy 
**Vulnerability Type:** Path Traversal (Arbitrary File Download)

**Affected Function:** `ajax_downloadfile()` 

**Impact:** Authenticated users with low privilege (Subscriber+) can download arbitrary files from the server, including sensitive configuration files, by exploiting insufficient validation of the `flm_file` parameter.  

**CVSS v3.1 Score:** 6.5 (Medium)   
**Vector:** AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

---
## Description

The `flm_file` parameter from the GET request is concatenated directly with the backup directory path without sufficient sanitization. The current sanitization function `Flmbkp_Form_Helper::sanitizeInput_html()` does not prevent sequences like `../`, allowing an attacker to traverse directories outside of the intended backup folder.

```  modules\filemanager\controllers\backups.php
// modules\filemanager\controllers\backups.php
public function ajax_downloadfile()
    {
        check_ajax_referer('flmbkp_ajax_nonce', 'flmbkp_security');
        @set_time_limit(900);
        $flm_file = (isset($_GET['flm_file'])) ? Flmbkp_Form_Helper::sanitizeInput_html($_GET['flm_file']) : '';
        
        $backup_directory=Flmbkp_Form_Helper::backup_directory();
        $fullpath = $backup_directory.'/'.$flm_file;
        
        header("Content-Length: ".filesize($fullpath));
        header("Content-type: application/octet-stream");
        header("Content-Disposition: attachment; filename=\"".basename($fullpath)."\";");
        readfile($fullpath);
        exit;
    }
```

---
### Steps to Reproduce

1.  **Login into the WordPress system** using Subscriber credentials.
![alt](./img/1.png)
2.  **Navigate to Plugins → File Manager & Backup** page.
![alt](./img/2.png)
3.  **Click the "Backup" button** to create a backup file.
![alt](./img/3.png)
4.  In the **Backup Data** section, click the **download file** option.
![alt](./img/4.png)  
5.  Intercept the download request in **Burp Suite** and modify the `flm_file` parameter to include a path traversal payload to target a sensitive file.  
![alt](./img/5.png)

---
### Impact

Disclosure of sensitive system files.

Exposure of credentials stored in files such as wp-config.php, .env, or application logs.

Facilitates further attacks, including full system compromise.

---
### Recommendation
Use realpath() to resolve the absolute path of the requested file and ensure it is inside the backup directory.

Reject requests containing ../, %00, or other traversal-related sequences before file access.

Enforce strict capability checks (e.g., only manage_options users can download backups).

Sanitize and validate the filename against a whitelist of allowed files.

### Video POC
If you're unable to reproduce the issue exactly as described in the report, please refer to the following video demonstration (PoC) for a clear reproduction scenario:

https://www.youtube.com/watch?v=b9M0nMDpMi0
文件快照

[4.0K] /data/pocs/00c632a34e9c8833a933597d6c765f2e15979c2a ├── [4.0K] img │   ├── [ 94K] 1.png │   ├── [135K] 2.png │   ├── [ 58K] 3.png │   ├── [ 61K] 4.png │   └── [119K] 5.png ├── [2.9K] PATH_TRAVERSAL.md ├── [2.9K] README.md └── [119K] Screenshot_79.png 1 directory, 8 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。