Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-12822 Overview
CVE-2025-12822 affects the WP Login and Register using JWT plugin for WordPress in all versions up to and including 3.0.0. The vulnerability stems from a missing capability check on the mo_jwt_generate_new_api_key function. Authenticated attackers with Subscriber-level access or above can generate a new API key on sites that do not have an API key configured. Attackers can then use that key to access restricted REST endpoints exposed by the plugin. The flaw is classified under CWE-862: Missing Authorization.
Critical Impact
Low-privileged Subscriber accounts can generate a JWT API key and reach protected endpoints, exposing data that should require administrator authorization.
Affected Products
- WP Login and Register using JWT (WordPress plugin)
- All versions up to and including 3.0.0
- Only installations without an API key already configured are exploitable
Discovery Timeline
- 2025-11-19 - CVE-2025-12822 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-12822
Vulnerability Analysis
The plugin exposes the mo_jwt_generate_new_api_key function without a capability check. WordPress plugins are expected to validate user capabilities with current_user_can() before performing privileged actions. This function omits that check and relies only on the user being authenticated. As a result, any logged-in user including a Subscriber can invoke the handler and generate a new API key. Once an API key exists, it unlocks the plugin's JWT-protected REST endpoints that return restricted data.
Root Cause
The root cause is a broken access control pattern. The handler for mo_jwt_generate_new_api_key authenticates the request but does not authorize it against a required role or capability. The function also runs only when no API key is currently stored, which narrows exploitability to fresh or misconfigured installations but does not remove the authorization gap.
Attack Vector
Exploitation requires network access to the WordPress site and a valid Subscriber-level account. The attacker sends a request that triggers mo_jwt_generate_new_api_key, receives the generated key, and reuses it to call restricted plugin endpoints. No user interaction and no elevated privileges are required beyond initial subscription. Technical details are documented in the Wordfence Vulnerability Report and the WordPress Trac Changeset.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2025-12822
Indicators of Compromise
- Unexpected invocations of the mo_jwt_generate_new_api_key action from non-administrator accounts
- Newly generated JWT API keys on WordPress sites that previously had none configured
- Subscriber or low-privileged accounts accessing plugin-protected REST endpoints
Detection Strategies
- Review WordPress action and AJAX logs for calls to mo_jwt_generate_new_api_key originating from users without administrator roles
- Audit the plugin's stored API key value and timestamp for unexpected creation events
- Correlate authenticated REST API requests carrying JWT tokens against the account roles that generated them
Monitoring Recommendations
- Enable verbose logging on the WordPress REST API and ship logs to a central platform for correlation
- Alert on first-time generation of API keys and on access to the plugin's protected endpoints by non-admin users
- Monitor new user registrations followed shortly by API key generation requests
How to Mitigate CVE-2025-12822
Immediate Actions Required
- Update the WP Login and Register using JWT plugin to a version later than 3.0.0 as soon as a fixed release is published
- Pre-configure an API key on all installations so the vulnerable code path cannot generate a new one
- Audit existing Subscriber accounts and remove any that are unknown or unused
Patch Information
The fix is tracked in the plugin repository under the WordPress Trac Changeset. Administrators should install the patched release and rotate any API keys that may have been generated before the update.
Workarounds
- Disable the WP Login and Register using JWT plugin until a patched version is installed
- Restrict new user registrations or require manual approval to limit Subscriber-level attack surface
- Place the WordPress REST API behind IP allowlists or a web application firewall rule blocking the vulnerable action for non-admin users
# Example: block the vulnerable action for non-admin requests at the web server
# nginx snippet - deny direct POSTs to the plugin action without an admin cookie
location = /wp-admin/admin-ajax.php {
if ($arg_action = "mo_jwt_generate_new_api_key") {
return 403;
}
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

