RegistrationMagic – Custom Registration Forms, User Registration, Payment, and User Login <= 6.0.7.1 - Authentication Bypass
Description
The RegistrationMagic – Custom Registration Forms, User Registration, Payment, and User Login plugin for WordPress is vulnerable to Authentication Bypass in all versions up to, and including, 6.0.7.1. This makes it possible for unauthenticated attackers to bypass authentication.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HTechnical Details
<=6.0.7.1What Changed in the Fix
Changes introduced in v6.0.7.2
Source Code
WordPress.org SVNThis research plan targets an **Authentication Bypass** vulnerability in RegistrationMagic (up to version 6.0.7.1). The vulnerability lies in the improper verification of identity during the social login process, allowing an unauthenticated attacker to log in as any user (including an administrator)…
Show full research plan
This research plan targets an Authentication Bypass vulnerability in RegistrationMagic (up to version 6.0.7.1). The vulnerability lies in the improper verification of identity during the social login process, allowing an unauthenticated attacker to log in as any user (including an administrator) by simply providing their email address.
1. Vulnerability Summary
- Vulnerability: Improper Authentication (Authentication Bypass)
- Location:
RM_Login_Controller::social_cb()(Inferred from the plugin's MVC structure and standard social login callback patterns). - Root Cause: The social login callback logic handles requests from external providers (Google, Facebook, etc.). In the vulnerable version, the plugin identifies the user by the
emailparameter provided in the request but fails to verify a valid OAuth token or "state" parameter from the provider. - Impact: Unauthenticated attackers can impersonate any user, typically the site administrator, gaining full control over the WordPress instance.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
rm_login_social_cb(mapped via therm_slugparameter or directly as an AJAX action). - Required Parameter:
email(The email of the target user) andtype(e.g.,google,facebook). - Authentication: None (Unauthenticated).
- Preconditions: The attacker must know the email address of an administrator.
3. Code Flow
- Entry Point: The request hits
admin-ajax.phpwithaction=rm_login_social_cb. - Routing:
Registration_Magic::define_public_hooks()registers the AJAX action to the main controller'srun()method:$this->loader->add_action('wp_ajax_nopriv_rm_login_social_cb', $this->controller, 'run'); - Controller Execution:
RM_Main_Controller::run()(inincludes/class_registration_magic.php) usesRM_Requestto extract therm_slug(which defaults to the action name). - Action Logic: The request is routed to
RM_Login_Controller. Thesocial_cb(or similarly named) method is invoked. - Bypass: The logic checks if a
typeandemailare provided. It then callsget_user_by('email', $request->req['email']). - Authentication Sink: If a user is found, the plugin calls
wp_set_auth_cookie($user->ID)andwp_set_current_user($user->ID)without checking for a valid secret/token from the social provider.
4. Nonce Acquisition Strategy
Social login callbacks are designed to be reached by external services and typically do not require a WordPress nonce.
- The
wp_ajax_nopriv_rm_login_social_cbhook is intended for unauthenticated access. - If the plugin attempted to verify a nonce, the external provider would fail to provide it, breaking the feature. Therefore, this endpoint is expected to be nonce-free.
- Verification: If the exploit fails with a
403or-1, check for nonce requirements in theRM_Login_Controller.
5. Exploitation Strategy
The goal is to log in as the administrator.
Step 1: Identify Administrator Email
Use the WordPress REST API to find the administrator's email.
- Request:
GET /wp-json/wp/v2/users - Tool:
http_request - Expected Result: Look for the user with
"slug": "admin"or ID1and note their email.
Step 2: Trigger Authentication Bypass
Send a crafted request to the social login callback endpoint.
- Request Method:
POST - URL:
http://localhost:8080/wp-admin/admin-ajax.php - Content-Type:
application/x-www-form-urlencoded - Body:
action=rm_login_social_cb&type=facebook&email=[ADMIN_EMAIL] - Alternative Body (if using rm_slug routing):
action=rm_run_action&rm_slug=rm_login_social_cb&type=facebook&email=[ADMIN_EMAIL]
Step 3: Capture Cookies
The server should respond with Set-Cookie headers containing wordpress_logged_in_[hash] and wordpress_[hash].
6. Test Data Setup
- WordPress User: Ensure a user with the
administratorrole exists (default isadminwith emailadmin@example.com). - Plugin State: RegistrationMagic must be active. No specific form configuration is required as the social login callback logic is globally active in the affected versions.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.