REPORT / 01

Analysis Report · Folder Analysis cache/wallet-system-for-woocommerce_2.7.2 → cache/wallet-system-for-woocommerce_2.7.3 — CVE-2025-14450

Shared security patch analysis results

mode patchdiff ai claude_cli haiku
02 · Lifecycle actions cancel · resume · skip · regenerate
03 · Share this analysis copy link · embed report
03 · CVE Security Analysis & Writeups ai-generated · per cve

Comprehensive security analysis generated by AI for each confirmed CVE match. Click on a CVE to view the detailed writeup including vulnerability background, technical details, patch analysis, and PoC guide.

CVE-2025-14450 NVD
AI-Generated Analysis
05 · Findings filter · search · paginate
Use quotes for exact: "SQL injection" · Operators: hello AND bye, admin OR root, -error, NOT warning
Showing 0 to 0 of 0 results
includes/class-wallet-system-ajaxhandler.php AI: 1 vulnerabilities 1 true positive CVE-2025-14450
--- cache/wallet-system-for-woocommerce_2.7.2/includes/class-wallet-system-ajaxhandler.php	2026-01-19 00:16:03.681215498 +0000+++ cache/wallet-system-for-woocommerce_2.7.3/includes/class-wallet-system-ajaxhandler.php	2026-01-19 00:18:26.342064786 +0000@@ -145,6 +145,8 @@  			$requesting_user_id = empty( $_POST['requesting_user_id'] ) ? 0 : sanitize_text_field( wp_unslash( $_POST['requesting_user_id'] ) ); +			$requested_user_id = empty( $_POST['requested_user_id'] ) ? 0 : sanitize_text_field( wp_unslash( $_POST['requested_user_id'] ) );+ 			$status = ( isset( $_POST['status'] ) ) ? sanitize_text_field( wp_unslash( $_POST['status'] ) ) : '';  			$withdrawal_balance = empty( $_POST['withdrawal_balance'] ) ? 0 : sanitize_text_field( wp_unslash( $_POST['withdrawal_balance'] ) );@@ -155,159 +157,168 @@  			$withdrawal_request = get_post( $request_id ); -			if ( 'approved' == $status ) {--				$requesting_user_wallet = get_user_meta( $requesting_user_id, 'wps_wallet', true );-				$requesting_user_wallet = (float) $requesting_user_wallet;-				$user_wallet = get_user_meta( $user_id, 'wps_wallet', true );-				$user_wallet = (float) $user_wallet;--				if ( $user_wallet >= $withdrawal_balance ) {-					$requesting_user_wallet += $withdrawal_balance;-					$returnid = update_user_meta( $requesting_user_id, 'wps_wallet', $requesting_user_wallet );--					if ( $returnid ) {-						$wallet_payment_gateway = new Wallet_System_For_Woocommerce();-						$send_email_enable      = get_option( 'wps_wsfw_enable_email_notification_for_wallet_update', '' );-						// first user.-						$user1 = get_user_by( 'id', $requesting_user_id );-						$name1 = $user1->first_name . ' ' . $user1->last_name;--						$user2 = get_user_by( 'id', $user_id );-						$name2 = $user2->first_name . ' ' . $user2->last_name;-						$balance   = $current_currency . ' ' . $withdrawal_balance;-						if ( isset( $send_email_enable ) && 'on' === $send_email_enable ) {--							$mail_text1  = esc_html__( 'Hello ', 'wallet-system-for-woocommerce' ) . esc_html( $name1 ) . ",\r\n";-							$mail_text1 .= __( 'Wallet credited by ', 'wallet-system-for-woocommerce' ) . esc_html( $balance ) . __( ' through wallet fund request by ', 'wallet-system-for-woocommerce' ) . $name2;-							$to1         = $user1->user_email;-							$from        = get_option( 'admin_email' );-							$subject     = __( 'Wallet updating notification', 'wallet-system-for-woocommerce' );-							$headers1    = 'MIME-Version: 1.0' . "\r\n";-							$headers1   .= 'Content-Type: text/html;  charset=UTF-8' . "\r\n";-							$headers1   .= 'From: ' . $from . "\r\n" .-							'Reply-To: ' . $to1 . "\r\n";--							if ( key_exists( 'wps_wswp_wallet_credit', WC()->mailer()->emails ) ) {--								$customer_email = WC()->mailer()->emails['wps_wswp_wallet_credit'];-								if ( ! empty( $customer_email ) ) {-									$user       = get_user_by( 'id', $requesting_user_id );-									$currency  = get_woocommerce_currency();-									$balance_mail = $balance;-									$user_name       = $user->first_name . ' ' . $user->last_name;-									$email_status = $customer_email->trigger( $requesting_user_id, $user_name, $balance_mail, '' );-								}-							} else {--								$wallet_payment_gateway->send_mail_on_wallet_updation( $to1, $subject, $mail_text1, $headers1 );-							}-						}--						$transaction_type     = __( 'Wallet credited by user ', 'wallet-system-for-woocommerce' ) . $user2->user_email . __( ' to user ', 'wallet-system-for-woocommerce' ) . $user1->user_email;-						$wallet_transfer_data = array(-							'user_id'          => $requesting_user_id,-							'amount'           => $withdrawal_balance,-							'currency'         => $current_currency,-							'payment_method'   => __( 'Wallet Fund Request', 'wallet-system-for-woocommerce' ),-							'transaction_type' => $transaction_type,-							'transaction_type_1' => 'credit',-							'order_id'         => '',-							'note'             => '',--						);--						$wallet_payment_gateway->insert_transaction_data_in_table( $wallet_transfer_data );--						$user_wallet -= $withdrawal_balance;-						$update_user = update_user_meta( $user_id, 'wps_wallet', abs( $user_wallet ) );-						if ( $update_user ) {+			if ( $requested_user_id != $user_id ) {+				$wps_wsfw_error_text = esc_html__( 'You are not authorized to perform this action', 'wallet-system-for-woocommerce' );+				$message             = array(+					'msg'     => $wps_wsfw_error_text,+					'msgType' => 'error',+				);+			} else {+				if ( 'approved' == $status ) {+	+					$requesting_user_wallet = get_user_meta( $requesting_user_id, 'wps_wallet', true );+					$requesting_user_wallet = (float) $requesting_user_wallet;+					$user_wallet = get_user_meta( $user_id, 'wps_wallet', true );+					$user_wallet = (float) $user_wallet;+	+					if ( $user_wallet >= $withdrawal_balance ) {+						$requesting_user_wallet += $withdrawal_balance;+						$returnid = update_user_meta( $requesting_user_id, 'wps_wallet', $requesting_user_wallet );+	+						if ( $returnid ) {+							$wallet_payment_gateway = new Wallet_System_For_Woocommerce();+							$send_email_enable      = get_option( 'wps_wsfw_enable_email_notification_for_wallet_update', '' );+							// first user.+							$user1 = get_user_by( 'id', $requesting_user_id );+							$name1 = $user1->first_name . ' ' . $user1->last_name;+	+							$user2 = get_user_by( 'id', $user_id );+							$name2 = $user2->first_name . ' ' . $user2->last_name; 							$balance   = $current_currency . ' ' . $withdrawal_balance; 							if ( isset( $send_email_enable ) && 'on' === $send_email_enable ) {-								$mail_text2  = esc_html__( 'Hello ', 'wallet-system-for-woocommerce' ) . esc_html( $name2 ) . ",\r\n";-								$mail_text2 .= __( 'Wallet debited by ', 'wallet-system-for-woocommerce' ) . esc_html( $balance ) . __( ' through wallet fund request to ', 'wallet-system-for-woocommerce' ) . $name1;-								$to2         = $user2->user_email;-								$headers2    = 'MIME-Version: 1.0' . "\r\n";-								$headers2   .= 'Content-Type: text/html;  charset=UTF-8' . "\r\n";-								$headers2   .= 'From: ' . $from . "\r\n" .-								'Reply-To: ' . $to2 . "\r\n";-								if ( key_exists( 'wps_wswp_wallet_debit', WC()->mailer()->emails ) ) {--									$customer_email = WC()->mailer()->emails['wps_wswp_wallet_debit'];+	+								$mail_text1  = esc_html__( 'Hello ', 'wallet-system-for-woocommerce' ) . esc_html( $name1 ) . ",\r\n";+								$mail_text1 .= __( 'Wallet credited by ', 'wallet-system-for-woocommerce' ) . esc_html( $balance ) . __( ' through wallet fund request by ', 'wallet-system-for-woocommerce' ) . $name2;+								$to1         = $user1->user_email;+								$from        = get_option( 'admin_email' );+								$subject     = __( 'Wallet updating notification', 'wallet-system-for-woocommerce' );+								$headers1    = 'MIME-Version: 1.0' . "\r\n";+								$headers1   .= 'Content-Type: text/html;  charset=UTF-8' . "\r\n";+								$headers1   .= 'From: ' . $from . "\r\n" .+								'Reply-To: ' . $to1 . "\r\n";+	+								if ( key_exists( 'wps_wswp_wallet_credit', WC()->mailer()->emails ) ) {+	+									$customer_email = WC()->mailer()->emails['wps_wswp_wallet_credit']; 									if ( ! empty( $customer_email ) ) {-										$user       = get_user_by( 'id', $user_id );+										$user       = get_user_by( 'id', $requesting_user_id ); 										$currency  = get_woocommerce_currency(); 										$balance_mail = $balance; 										$user_name       = $user->first_name . ' ' . $user->last_name;-										$customer_email->trigger( $user_id, $user_name, $balance_mail, '' );+										$email_status = $customer_email->trigger( $requesting_user_id, $user_name, $balance_mail, '' ); 									} 								} else {--									$wallet_payment_gateway->send_mail_on_wallet_updation( $to2, $subject, $mail_text2, $headers2 );+	+									$wallet_payment_gateway->send_mail_on_wallet_updation( $to1, $subject, $mail_text1, $headers1 ); 								} 							}--							$transaction_type = __( 'Wallet debited from user ', 'wallet-system-for-woocommerce' ) . $user2->user_email . __( ' wallet, transferred to user ', 'wallet-system-for-woocommerce' ) . $user1->user_email;-							$transaction_data = array(-								'user_id'          => $user_id,+	+							$transaction_type     = __( 'Wallet credited by user ', 'wallet-system-for-woocommerce' ) . $user2->user_email . __( ' to user ', 'wallet-system-for-woocommerce' ) . $user1->user_email;+							$wallet_transfer_data = array(+								'user_id'          => $requesting_user_id, 								'amount'           => $withdrawal_balance, 								'currency'         => $current_currency, 								'payment_method'   => __( 'Wallet Fund Request', 'wallet-system-for-woocommerce' ), 								'transaction_type' => $transaction_type,-								'transaction_type_1' => 'debit',+								'transaction_type_1' => 'credit', 								'order_id'         => '', 								'note'             => '',--							);--							$result = $wallet_payment_gateway->insert_transaction_data_in_table( $transaction_data );-							$withdrawal_request->post_status = 'approved';-							wp_update_post( $withdrawal_request );-							$wps_wsfw_error_text = esc_html__( 'Wallet fund request is approved for user #', 'wallet-system-for-woocommerce' ) . $requesting_user_id;-							$message             = array(-								'msg'     => $wps_wsfw_error_text,-								'msgType' => 'success',+	 							);-						} else {-							$wps_wsfw_error_text = esc_html__( 'There is an error in database', 'wallet-system-for-woocommerce' );-									$message             = array(-										'msg'     => $wps_wsfw_error_text,-										'msgType' => 'error',-									);+	+							$wallet_payment_gateway->insert_transaction_data_in_table( $wallet_transfer_data );+	+							$user_wallet -= $withdrawal_balance;+							$update_user = update_user_meta( $user_id, 'wps_wallet', abs( $user_wallet ) );+							if ( $update_user ) {+								$balance   = $current_currency . ' ' . $withdrawal_balance;+								if ( isset( $send_email_enable ) && 'on' === $send_email_enable ) {+									$mail_text2  = esc_html__( 'Hello ', 'wallet-system-for-woocommerce' ) . esc_html( $name2 ) . ",\r\n";+									$mail_text2 .= __( 'Wallet debited by ', 'wallet-system-for-woocommerce' ) . esc_html( $balance ) . __( ' through wallet fund request to ', 'wallet-system-for-woocommerce' ) . $name1;+									$to2         = $user2->user_email;+									$headers2    = 'MIME-Version: 1.0' . "\r\n";+									$headers2   .= 'Content-Type: text/html;  charset=UTF-8' . "\r\n";+									$headers2   .= 'From: ' . $from . "\r\n" .+									'Reply-To: ' . $to2 . "\r\n";+									if ( key_exists( 'wps_wswp_wallet_debit', WC()->mailer()->emails ) ) {+	+										$customer_email = WC()->mailer()->emails['wps_wswp_wallet_debit'];+										if ( ! empty( $customer_email ) ) {+											$user       = get_user_by( 'id', $user_id );+											$currency  = get_woocommerce_currency();+											$balance_mail = $balance;+											$user_name       = $user->first_name . ' ' . $user->last_name;+											$customer_email->trigger( $user_id, $user_name, $balance_mail, '' );+										}+									} else {+	+										$wallet_payment_gateway->send_mail_on_wallet_updation( $to2, $subject, $mail_text2, $headers2 );+									}+								}+	+								$transaction_type = __( 'Wallet debited from user ', 'wallet-system-for-woocommerce' ) . $user2->user_email . __( ' wallet, transferred to user ', 'wallet-system-for-woocommerce' ) . $user1->user_email;+								$transaction_data = array(+									'user_id'          => $user_id,+									'amount'           => $withdrawal_balance,+									'currency'         => $current_currency,+									'payment_method'   => __( 'Wallet Fund Request', 'wallet-system-for-woocommerce' ),+									'transaction_type' => $transaction_type,+									'transaction_type_1' => 'debit',+									'order_id'         => '',+									'note'             => '',+	+								);+	+								$result = $wallet_payment_gateway->insert_transaction_data_in_table( $transaction_data );+								$withdrawal_request->post_status = 'approved';+								wp_update_post( $withdrawal_request );+								$wps_wsfw_error_text = esc_html__( 'Wallet fund request is approved for user #', 'wallet-system-for-woocommerce' ) . $requesting_user_id;+								$message             = array(+									'msg'     => $wps_wsfw_error_text,+									'msgType' => 'success',+								);+							} else {+								$wps_wsfw_error_text = esc_html__( 'There is an error in database', 'wallet-system-for-woocommerce' );+										$message             = array(+											'msg'     => $wps_wsfw_error_text,+											'msgType' => 'error',+										);+							} 						}+					} else {+						$wps_wsfw_error_text = esc_html__( 'There is an error in database', 'wallet-system-for-woocommerce' );+						$message             = array(+							'msg'     => $wps_wsfw_error_text,+							'msgType' => 'error',+						); 					}-				} else {-					$wps_wsfw_error_text = esc_html__( 'There is an error in database', 'wallet-system-for-woocommerce' );-					$message             = array(-						'msg'     => $wps_wsfw_error_text,-						'msgType' => 'error',-					); 				}-			}-			if ( 'rejected' == $status ) {-				if ( $user_id ) {--					$withdrawal_request->post_status = 'rejected';-					wp_update_post( $withdrawal_request );-					$wps_wsfw_error_text = esc_html__( 'Wallet fund request is rejected for user #', 'wallet-system-for-woocommerce' ) . $requesting_user_id;-					$message             = array(-						'msg'     => $wps_wsfw_error_text,-						'msgType' => 'success',-					);+				if ( 'rejected' == $status ) {+					if ( $user_id ) {+	+						$withdrawal_request->post_status = 'rejected';+						wp_update_post( $withdrawal_request );+						$wps_wsfw_error_text = esc_html__( 'Wallet fund request is rejected for user #', 'wallet-system-for-woocommerce' ) . $requesting_user_id;+						$message             = array(+							'msg'     => $wps_wsfw_error_text,+							'msgType' => 'success',+						);+					}+				}+				if ( 'pending1' === $status ) {+	+					if ( $user_id ) {+						$withdrawal_request->post_status = 'pending1';+						wp_update_post( $withdrawal_request );+						$wps_wsfw_error_text = esc_html__( 'Wallet withdrawal request status is changed to pending for user #', 'wallet-system-for-woocommerce' ) . $user_id;+						$message             = array(+							'msg'     => $wps_wsfw_error_text,+							'msgType' => 'success',+						);+					}; 				} 			}-			if ( 'pending1' === $status ) { -				if ( $user_id ) {-					$withdrawal_request->post_status = 'pending1';-					wp_update_post( $withdrawal_request );-					$wps_wsfw_error_text = esc_html__( 'Wallet withdrawal request status is changed to pending for user #', 'wallet-system-for-woocommerce' ) . $user_id;-					$message             = array(-						'msg'     => $wps_wsfw_error_text,-						'msgType' => 'success',-					);-				};-			}  			wp_send_json( $message ); 		}
AI Analysis
Vulnerability Existed: yes
TRUE POSITIVE
Broken Access Control - CWE-639 - includes/class-wallet-system-ajaxhandler.php - Lines 158-161 (new code)

**Old Code:**
```php
if ( 'approved' == $status ) {
    $requesting_user_wallet = get_user_meta( $requesting_user_id, 'wps_wallet', true );
    // ... processing without authorization check
```

**Fixed Code:**
```php
if ( $requested_user_id != $user_id ) {
    $wps_wsfw_error_text = esc_html__( 'You are not authorized to perform this action', 'wallet-system-for-woocommerce' );
    $message             = array(
        'msg'     => $wps_wsfw_error_text,
        'msgType' => 'error',
    );
} else {
    if ( 'approved' == $status ) {
        // ... processing now protected by authorization check
```

**Explanation:**
This diff fixes a critical authorization bypass vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key). The old code allowed any user to approve wallet fund requests without verifying that they are the intended recipient (`$user_id`). An attacker could submit arbitrary `$requested_user_id` values to approve requests meant for other users or manipulate wallet transfers.

The fix adds an authorization check that compares `$requested_user_id` (extracted from POST data at line 148) against `$user_id` (the current user), rejecting the request with an authorization error if they don't match. This ensures only the intended recipient can approve their own wallet fund requests. The entire wallet manipulation logic is now wrapped in an `else` block that only executes if authorization succeeds.
CVE Analysis Results:
CVE-2025-14450: Yes
View CVE Description
The Wallet System for WooCommerce plugin for WordPress is vulnerable to unauthorized modification of data due to a missing capability check on the 'change_wallet_fund_request_status_callback' function in all versions up to, and including, 2.7.2. This makes it possible for authenticated attackers, with Subscriber-level access and above, to manipulate wallet withdrawal requests and arbitrarily increase their wallet balance or decrease other users' balances.
Showing 1 to 1 of 1 results