CVE-2026-39463

ManageWP Worker <= 4.9.31 - Unauthenticated Stored Cross-Site Scripting

highImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
7.2
CVSS Score
7.2
CVSS Score
high
Severity
4.9.32
Patched in
9d
Time to patch

Description

The ManageWP Worker plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 4.9.31 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=4.9.31
PublishedApril 13, 2026
Last updatedApril 21, 2026
Affected pluginworker

What Changed in the Fix

Changes introduced in v4.9.32

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

# Research Plan: ManageWP Worker Unauthenticated Stored XSS (CVE-2026-39463) ## 1. Vulnerability Summary The **ManageWP Worker** plugin (versions <= 4.9.31) is vulnerable to **Unauthenticated Stored Cross-Site Scripting (XSS)**. The vulnerability exists because the plugin records communication erro…

Show full research plan

Research Plan: ManageWP Worker Unauthenticated Stored XSS (CVE-2026-39463)

1. Vulnerability Summary

The ManageWP Worker plugin (versions <= 4.9.31) is vulnerable to Unauthenticated Stored Cross-Site Scripting (XSS). The vulnerability exists because the plugin records communication errors from incoming ManageWP service requests into a WordPress option (mwp_last_communication_error) without proper sanitization. When a service request fails authentication (e.g., due to an invalid signature or missing public key), the plugin includes parts of the request—such as the provided public key name or the request parameters—directly in the error message. This stored error message is subsequently displayed in the WordPress admin dashboard (specifically in the connection modal or admin notices) without sufficient output escaping, allowing an unauthenticated attacker to inject malicious JavaScript.

2. Attack Vector Analysis

  • Endpoint: Any page on the WordPress site (ManageWP Worker intercepts requests at the init or plugins_loaded stage).
  • Trigger: An incoming HTTP request containing ManageWP-specific headers that fail authentication.
  • Vulnerable Parameter: MWP-Public-Key header (mapped to keyName) or request parameters.
  • Authentication Level: Unauthenticated (no login required).
  • Preconditions: The plugin must be active.

3. Code Flow

  1. Entry Point: A request is made to the WordPress site with the header `MWP
Research Findings
Static analysis — not yet PoC-verified

Summary

The ManageWP Worker plugin for WordPress is vulnerable to unauthenticated Stored Cross-Site Scripting (XSS) via the 'mwp_last_communication_error' option. The plugin records failed authentication attempts from the ManageWP service and includes unsanitized request metadata, such as public key names or raw message contents, which are then displayed to administrators without proper escaping.

Vulnerable Code

// src/MWP/EventListener/MasterRequest/AuthenticateServiceRequest.php
$keyName = $request->getKeyName();

if (empty($serviceSignature) || empty($keyName)) {
    $this->context->optionSet('mwp_last_communication_error', 'Unexpected: service signature or key name are empty. Key name: '.$keyName.', Signature: '.$serviceSignature.', Algorithm: '.($algorithm ? $algorithm : 'SHA1'));
    return;
}

// ... line 67 ...
if (empty($publicKey)) {
    $this->context->optionSet('mwp_last_communication_error', 'Could not find the appropriate communication key. Searched for: '.$keyName);
    return;
}

// ... line 101 ...
if (!$verify) {
    $this->context->optionSet('mwp_last_communication_error', 'Message signature invalid. Tried to verify: '.$messageToCheck.', Signature: '.base64_encode($serviceSignature));
    return;
}

---

// src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php
<p>
    <?php echo 'Last communication error: '.$this->context->optionGet('mwp_last_communication_error', '') ?>
</p>

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.31/src/MWP/EventListener/MasterRequest/AuthenticateServiceRequest.php /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.32/src/MWP/EventListener/MasterRequest/AuthenticateServiceRequest.php
--- /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.31/src/MWP/EventListener/MasterRequest/AuthenticateServiceRequest.php	2025-04-25 08:44:02.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.32/src/MWP/EventListener/MasterRequest/AuthenticateServiceRequest.php	2026-03-18 13:39:12.000000000 +0000
@@ -46,6 +46,8 @@
         }
 
         $algorithm = $request->getSignatureAlgorithm();
+        // Sanitize algorithm to prevent XSS when displayed in debug output
+        $sanitizedAlgorithm = sanitize_text_field($algorithm);
 
         if ($algorithm == 'SHA256') {
             $serviceSignature = $request->getServiceSignatureV2();
@@ -56,9 +58,11 @@
         }
 
         $keyName = $request->getKeyName();
+        // Sanitize key name to prevent XSS when displayed in debug output
+        $sanitizedKeyName = sanitize_text_field($keyName);
 
         if (empty($serviceSignature) || empty($keyName)) {
-            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: service signature or key name are empty. Key name: '.$keyName.', Signature: '.$serviceSignature.', Algorithm: '.($algorithm ? $algorithm : 'SHA1'));
+            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: service signature or key name are empty. Key name: '.$sanitizedKeyName.', Signature: '.$serviceSignature.', Algorithm: '.($sanitizedAlgorithm ? $sanitizedAlgorithm : 'SHA1'));
             return;
         }
 
@@ -67,7 +71,7 @@
         if (empty($publicKey)) {
             // for now do not throw an exception, just do not authenticate the request
             // later we should start throwing an exception here when this becomes the main communication method
-            $this->context->optionSet('mwp_last_communication_error', 'Could not find the appropriate communication key. Searched for: '.$keyName);
+            $this->context->optionSet('mwp_last_communication_error', 'Could not find the appropriate communication key. Searched for: '.$sanitizedKeyName);
             return;
         }
 
@@ -75,7 +79,7 @@
         $messageToCheck   = '';
 
         if (empty($communicationKey)) {
-            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: communication key is empty. Key name: '.$keyName);
+            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: communication key is empty. Key name: '.$sanitizedKeyName);
             return;
         }
 
@@ -88,7 +92,7 @@
         if (empty($messageToCheck)) {
             // for now do not throw an exception, just do not authenticate the request
             // later we should start throwing an exception here when this becomes the main communication method
-            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: message to check is empty. Host: '.$request->server['HTTP_HOST']);
+            $this->context->optionSet('mwp_last_communication_error', 'Unexpected: message to check is empty. Host: '.sanitize_text_field($request->server['HTTP_HOST']));
             return;
         }
 
@@ -101,7 +105,7 @@
         if (!$verify) {
             // for now do not throw an exception, just do not authenticate the request
             // later we should start throwing an exception here when this becomes the main communication method
-            $this->context->optionSet('mwp_last_communication_error', 'Message signature invalid. Tried to verify: '.$messageToCheck.', Signature: '.base64_encode($serviceSignature));
+            $this->context->optionSet('mwp_last_communication_error', 'Message signature invalid. Tried to verify: '.base64_encode($messageToCheck).', Signature: '.base64_encode($serviceSignature));
             return;
         }

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.31/src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.32/src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php
--- /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.31/src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php
+++ /home/deploy/wp-safety.org/data/plugin-versions/worker/4.9.32/src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php
@@ -410,21 +410,28 @@
                     if ($refreshedKeys['success'] === true) {
                         echo 'Keys successfully refreshed!';
                     } else {
-                        echo 'Keys were not successfully refreshed. Error: '.$refreshedKeys['message'];
+                        echo 'Keys were not successfully refreshed. Error: '.esc_html($refreshedKeys['message']);
                     } ?>
                 </p>
                 <p>
-                    <?php echo 'Last communication error: '.$this->context->optionGet('mwp_last_communication_error', '') ?>
+                    <?php echo 'Last communication error: '.esc_html($this->context->optionGet('mwp_last_communication_error', '')) ?>
                 </p>

Exploit Outline

To exploit this vulnerability, an unauthenticated attacker sends a crafted HTTP request containing ManageWP-specific headers, such as 'MWP-Public-Key', with a malicious JavaScript payload (e.g., <script>alert(1)</script>). By purposefully omitting or invalidating the 'MWP-Signature' header, the attacker triggers an authentication failure. The plugin's AuthenticateServiceRequest listener captures the failure and saves the error message—including the malicious header value—into the 'mwp_last_communication_error' WordPress option. When a site administrator later visits the plugin's connection management interface (typically via plugins.php?worker_connections=1), the stored payload is rendered without escaping, resulting in script execution in the administrator's browser context.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.