Analysis Report Folder Analysis cache/cost-calculator-builder_3.6.9 → cache/cost-calculator-builder_3.6.10 - CVE-2025-14757

Shared security patch analysis results

AI Used: claude_cli haiku
Share this analysis
Use quotes for exact: \"SQL injection\" | Operators: hello AND bye, admin OR root, -error, NOT warning
Showing 0 to 0 of 0 results
cost-calculator-builder.php AI: No vulnerabilities
--- cache/cost-calculator-builder_3.6.9/cost-calculator-builder.php	2026-01-16 00:20:27.725370377 +0000+++ cache/cost-calculator-builder_3.6.10/cost-calculator-builder.php	2026-01-16 00:20:53.294974810 +0000@@ -8,7 +8,7 @@  * License: GNU General Public License v2 or later  * License URI: http://www.gnu.org/licenses/gpl-2.0.html  * Text Domain: cost-calculator-builder- * Version: 3.6.9+ * Version: 3.6.10  */  if ( ! defined( 'ABSPATH' ) ) {@@ -17,9 +17,9 @@  define( 'CALC_DIR', __DIR__ ); define( 'CALC_FILE', __FILE__ );-define( 'CALC_VERSION', '3.6.9' );+define( 'CALC_VERSION', '3.6.10' ); define( 'CALC_WP_TESTED_UP', '6.9' );-define( 'CALC_DB_VERSION', '3.6.9' );+define( 'CALC_DB_VERSION', '3.6.10' ); define( 'CALC_PATH', dirname( CALC_FILE ) ); define( 'CALC_URL', plugins_url( '', CALC_FILE ) ); 
AI Analysis
I'll analyze this code diff for security vulnerabilities.

**Analysis Result:**

Vulnerability Existed: **no**

No CWE - N/A - cost-calculator-builder.php (lines 11, 20, 23)

Old Code:
```
* Version: 3.6.9
define( 'CALC_VERSION', '3.6.9' );
define( 'CALC_DB_VERSION', '3.6.9' );
```

Fixed Code:
```
* Version: 3.6.10
define( 'CALC_VERSION', '3.6.10' );
define( 'CALC_DB_VERSION', '3.6.10' );
```

Explanation:
This diff contains only version number updates from 3.6.9 to 3.6.10 across three locations in the plugin header and constant definitions. These are simple string replacements with no security implications. The changes do not:
- Modify any input validation or sanitization logic
- Alter authentication or authorization mechanisms
- Change data handling or storage practices
- Affect code execution paths or security controls
- Introduce or remove any potentially vulnerable code patterns

This is a routine version bump with no security fixes or security regressions introduced.
CVE Analysis Results:
CVE-2025-14757: No
View CVE Description
The Cost Calculator Builder plugin for WordPress is vulnerable to Unauthenticated Payment Status Bypass in all versions up to, and including, 3.6.9 only when used in combination with Cost Calculator Builder PRO. This is due to the complete_payment AJAX action being registered via wp_ajax_nopriv, making it accessible to unauthenticated users, and the complete() function only verifying a nonce without checking user capabilities or order ownership. Since nonces are exposed to all visitors via window.ccb_nonces in the page source, any unauthenticated attacker can mark any order's payment status as "completed" without actual payment.
includes/classes/CCBFrontController.php AI: 1 vulnerabilities 1 false positive
--- cache/cost-calculator-builder_3.6.9/includes/classes/CCBFrontController.php	2026-01-16 00:20:35.289845157 +0000+++ cache/cost-calculator-builder_3.6.10/includes/classes/CCBFrontController.php	2026-01-16 00:21:31.625377750 +0000@@ -45,11 +45,12 @@ 			return ''; 		} -		$calculators   = CCBUpdatesCallbacks::get_calculators();-		$sticky_calc   = '';-		$has_sticky    = false;-		$calc_sticky   = '';-		$sticky_banner = '';+		$calculators    = CCBUpdatesCallbacks::get_calculators();+		$sticky_calc    = '';+		$has_sticky     = false;+		$calc_sticky    = '';+		$sticky_banner  = '';+		$has_embed_calc = false;  		$positions = array( 			'top_left'      => 0,@@ -89,7 +90,6 @@ 						}  						wp_enqueue_style( 'ccb-sticky-css', CALC_URL . '/frontend/dist/css/sticky.css', array(), CALC_VERSION );-						wp_enqueue_style( 'ccb-bootstrap-css', CALC_URL . '/frontend/dist/css/modal.bootstrap.css', array(), CALC_VERSION ); 						wp_enqueue_script( 'ccb-velocity-ui-js', CALC_URL . '/frontend/dist/libs/velocity.ui.min.js', array(), CALC_VERSION, true ); 						wp_enqueue_script( 'ccb-velocity-ui-js', CALC_URL . '/frontend/dist/libs/velocity.ui.min.js', array(), CALC_VERSION, true ); @@ -106,6 +106,23 @@  					$currency = $global_settings['currency']['use_in_all'] ? $global_settings['currency'] : $calc_settings['currency']; +					if ( isset( $post->post_content ) && has_shortcode( $post->post_content, 'stm-calc' ) ) {+						preg_match_all(+							'/\[stm-calc\s+id="(\d+)"\]/',+							$post->post_content,+							$matches+						);++						if ( ! empty( $matches[1] ) ) {+							foreach ( $matches[1] as $shortcode_id ) {+								if ( (int) $shortcode_id === (int) $calculator->ID ) {+									$has_embed_calc = true;+									break;+								}+							}+						}+					}+ 					$sticky_settings_data = array( 						'title'               => get_post_meta( $calculator->ID, 'stm-name', true ), 						'calcId'              => $calculator->ID,@@ -114,6 +131,7 @@ 						'currency'            => $currency, 						'translations'        => CCBTranslations::get_frontend_translations(), 						'is_pro_active'       => ccb_pro_active(),+						'has_embed_calc'      => $has_embed_calc, 					);  					$GLOBALS['ccb_sticky_data'][ $calculator->ID ] = $sticky_settings_data;
AI Analysis
Let me analyze the provided code diff:

---

**Vulnerability 1:**

Vulnerability Existed: yes
FALSE POSITIVE

**Regular Expression Denial of Service (ReDoS) / Improper Input Validation - CWE-1025** - File: includes/classes/CCBFrontController.php - Lines 109-112

Old Code:
```
(No pattern matching existed in this version)
```

Fixed Code:
```php
preg_match_all(
    '/\[stm-calc\s+id="(\d+)"\]/',
    $post->post_content,
    $matches
);
```

Explanation:
This change introduces a potential ReDoS (Regular Expression Denial of Service) vulnerability if `$post->post_content` can contain untrusted or adversarial input. The regex pattern `/\[stm-calc\s+id="(\d+)"\]/` uses `\s+` which could be exploited with specially crafted content to cause excessive backtracking. However, the pattern itself is relatively simple and the risk is mitigated by the fact that this is WordPress post content (typically controlled by site administrators). The actual vulnerability risk is moderate because while the regex is safe from catastrophic backtracking, there's no validation or sanitization of the matched shortcode ID before casting it to int.

---

**Vulnerability 2:**

Vulnerability Existed: not sure

**Type Juggling / Weak Type Comparison - CWE-1025** - File: includes/classes/CCBFrontController.php - Lines 117-119

Old Code:
```
(New comparison in updated code)
```

Fixed Code:
```php
if ( (int) $shortcode_id === (int) $calculator->ID ) {
    $has_embed_calc = true;
    break;
}
```

Explanation:
The comparison uses strict equality (`===`) after explicit int casting, which is secure. The `preg_match_all()` returns string matches that are properly cast to integers before comparison. This is actually a security improvement as it prevents type juggling vulnerabilities. No vulnerability exists here - this is secure code.

---

**Vulnerability 3:**

Vulnerability Existed: no

**Removal of Stylesheet - Potential Security Improvement - CWE-829** - File: includes/classes/CCBFrontController.php - Line 93

Old Code:
```php
wp_enqueue_style( 'ccb-bootstrap-css', CALC_URL . '/frontend/dist/css/modal.bootstrap.css', array(), CALC_VERSION );
```

Fixed Code:
```
(Line removed)
```

Explanation:
The removal of the bootstrap CSS enqueue is a security improvement rather than a vulnerability fix. Reducing dependencies and enqueued resources decreases the attack surface. This is a positive security change, not a vulnerability being fixed.
CVE Analysis Results:
CVE-2025-14757: No
View CVE Description
The Cost Calculator Builder plugin for WordPress is vulnerable to Unauthenticated Payment Status Bypass in all versions up to, and including, 3.6.9 only when used in combination with Cost Calculator Builder PRO. This is due to the complete_payment AJAX action being registered via wp_ajax_nopriv, making it accessible to unauthenticated users, and the complete() function only verifying a nonce without checking user capabilities or order ownership. Since nonces are exposed to all visitors via window.ccb_nonces in the page source, any unauthenticated attacker can mark any order's payment status as "completed" without actual payment.
includes/classes/CCBOrderController.php AI: 1 vulnerabilities 1 false positive
--- cache/cost-calculator-builder_3.6.9/includes/classes/CCBOrderController.php	2026-01-16 00:20:35.289845157 +0000+++ cache/cost-calculator-builder_3.6.10/includes/classes/CCBOrderController.php	2026-01-16 00:21:31.861392538 +0000@@ -421,80 +421,6 @@ 		wp_send_json( $result ); 	} -	public static function complete() {-		check_ajax_referer( 'ccb_complete_payment', 'nonce' );--		$result = array(-			'status'  => 'error',-			'success' => false,-			'message' => __( 'Invalid data', 'cost-calculator-builder' ),-		);--		if ( empty( $_POST['data'] ) ) {-			wp_send_json( $result );-		}--		$data = null;-		if ( isset( $_POST['data'] ) ) {-			$data = ccb_convert_from_btoa( $_POST['data'], true );-		}--		$order_id = ! empty( $data['orderId'] ) ? sanitize_text_field( $data['orderId'] ) : null;-		if ( ! empty( $order_id ) ) {-			if ( ! is_numeric( $order_id ) ) {-				$result['message'] = __( 'Invalid order id', 'cost-calculator-builder' );-				wp_send_json( $result );-			}--			$order = CalcOrders::get_order_full_data_by_id( $order_id );-			if ( empty( $order ) ) {-				$result['message'] = __( 'Order not found', 'cost-calculator-builder' );-				wp_send_json( $result );-			}--			try {-				$completed_status = OrdersStatuses::get_completed_status();-				if ( $completed_status['id'] === $order['payment_status'] ) {-					wp_send_json(-						array(-							'status'  => 'error',-							'success' => false,-							'message' => __( 'Order already completed', 'cost-calculator-builder' ),-						)-					);-				}--				if ( $completed_status['id'] !== $order['payment_status'] ) {-					OrdersPayments::update_payment_status_by_order_id( $order_id, $completed_status['id'] );-				}--				wp_send_json(-					array(-						'status'  => 200,-						'success' => true,-						'message' => __( 'Order completed successfully', 'cost-calculator-builder' ),-					)-				);-			} catch ( \Exception $e ) {-				wp_send_json(-					array(-						'status'  => 'error',-						'success' => false,-						'message' => $e->getMessage(),-					)-				);-			}-		}--		wp_send_json(-			array(-				'status'  => 'error',-				'success' => false,-				'message' => __( 'Invalid order id', 'cost-calculator-builder' ),-			)-		);-	}- 	public static function delete() {}  	public static function renderWooCommercePayment() {
AI Analysis
Based on the provided diff, here is the security analysis:

---

**Vulnerability Existed: yes**
FALSE POSITIVE

**Improper Input Validation and Authorization - CWE-352 (Cross-Site Request Forgery (CSRF)) and CWE-434 (Unrestricted Upload of File with Dangerous Type) - includes/classes/CCBOrderController.php [424-494]**

**Old Code:**
```php
public static function complete() {
    check_ajax_referer( 'ccb_complete_payment', 'nonce' );
    
    $result = array(
        'status'  => 'error',
        'success' => false,
        'message' => __( 'Invalid data', 'cost-calculator-builder' ),
    );
    
    if ( empty( $_POST['data'] ) ) {
        wp_send_json( $result );
    }
    
    $data = null;
    if ( isset( $_POST['data'] ) ) {
        $data = ccb_convert_from_btoa( $_POST['data'], true );
    }
    
    $order_id = ! empty( $data['orderId'] ) ? sanitize_text_field( $data['orderId'] ) : null;
    // ... order completion logic
}
```

**Fixed Code:**
```
[Function completely removed]
```

**Explanation:**

The `complete()` function was vulnerable to multiple security issues:

1. **Insufficient Input Validation**: While the function checks for a nonce (`check_ajax_referer`), the order completion logic relies on user-supplied data from `$_POST['data']` that is decoded via `ccb_convert_from_btoa()`. The `order_id` is only sanitized with `sanitize_text_field()`, which is insufficient for numeric validation before database operations.

2. **Authorization Issues**: The function lacks proper capability checks (`current_user_can()`) to verify that the authenticated user has permission to complete a specific order. Any logged-in user could potentially complete any order by manipulating the `orderId` parameter.

3. **Information Disclosure**: The exception message is directly sent back to the client via `$e->getMessage()`, potentially exposing sensitive system information.

By removing this function entirely, the application eliminates these security risks. This suggests the order completion functionality was either deprecated, replaced with a more secure implementation elsewhere, or no longer needed in version 3.6.10.
CVE Analysis Results:
CVE-2025-14757: No
View CVE Description
The Cost Calculator Builder plugin for WordPress is vulnerable to Unauthenticated Payment Status Bypass in all versions up to, and including, 3.6.9 only when used in combination with Cost Calculator Builder PRO. This is due to the complete_payment AJAX action being registered via wp_ajax_nopriv, making it accessible to unauthenticated users, and the complete() function only verifying a nonce without checking user capabilities or order ownership. Since nonces are exposed to all visitors via window.ccb_nonces in the page source, any unauthenticated attacker can mark any order's payment status as "completed" without actual payment.
includes/classes/models/CalcOrders.php AI: 1 vulnerabilities 1 true positive
--- cache/cost-calculator-builder_3.6.9/includes/classes/models/CalcOrders.php	2026-01-16 00:20:35.349848922 +0000+++ cache/cost-calculator-builder_3.6.10/includes/classes/models/CalcOrders.php	2026-01-16 00:21:31.921396298 +0000@@ -1212,6 +1212,10 @@ 			$result[] = $calc_settings['formFields']['adminEmailAddress']; 		} -		return array_merge( $result, $calc_settings['formFields']['customEmailAddresses'] );+		if ( ! empty( $calc_settings['formFields']['customEmailAddresses'] ) ) {+			$result = array_merge( $result, $calc_settings['formFields']['customEmailAddresses'] );+		}++		return $result; 	} }
AI Analysis
Vulnerability Existed: yes
TRUE POSITIVE
Improper Input Validation (Type Confusion/Array Merge) - CWE-1025 - includes/classes/models/CalcOrders.php - Lines 1215

Old Code:
```php
return array_merge( $result, $calc_settings['formFields']['customEmailAddresses'] );
```

Fixed Code:
```php
if ( ! empty( $calc_settings['formFields']['customEmailAddresses'] ) ) {
    $result = array_merge( $result, $calc_settings['formFields']['customEmailAddresses'] );
}

return $result;
```

Explanation:
The original code was vulnerable to a type confusion/improper input validation vulnerability. The `array_merge()` function would fail or produce unexpected behavior if `$calc_settings['formFields']['customEmailAddresses']` was not an array (e.g., if it was null, a string, or another non-array type). Additionally, without the empty check, attempting to merge with potentially undefined or malformed data could cause runtime errors or unexpected behavior.

The fix adds a guard clause using `empty()` to verify that `customEmailAddresses` exists and is not empty before attempting the merge. This prevents type errors and ensures only valid array data is processed. The function now safely returns the `$result` array with only validated custom email addresses merged in, protecting against cases where the configuration data might be malformed or missing.
CVE Analysis Results:
CVE-2025-14757: No
View CVE Description
The Cost Calculator Builder plugin for WordPress is vulnerable to Unauthenticated Payment Status Bypass in all versions up to, and including, 3.6.9 only when used in combination with Cost Calculator Builder PRO. This is due to the complete_payment AJAX action being registered via wp_ajax_nopriv, making it accessible to unauthenticated users, and the complete() function only verifying a nonce without checking user capabilities or order ownership. Since nonces are exposed to all visitors via window.ccb_nonces in the page source, any unauthenticated attacker can mark any order's payment status as "completed" without actual payment.
includes/install.php AI: No vulnerabilities
--- cache/cost-calculator-builder_3.6.9/includes/install.php	2026-01-16 00:20:35.481857206 +0000+++ cache/cost-calculator-builder_3.6.10/includes/install.php	2026-01-16 00:21:32.845454195 +0000@@ -6,7 +6,6 @@ 		'ccb_woo_checkout'        => wp_create_nonce( 'ccb_woo_checkout' ), 		'ccb_add_order'           => wp_create_nonce( 'ccb_add_order' ), 		'ccb_orders'              => wp_create_nonce( 'ccb_orders' ),-		'ccb_complete_payment'    => wp_create_nonce( 'ccb_complete_payment' ), 		'ccb_send_invoice'        => wp_create_nonce( 'ccb_send_invoice' ), 		'ccb_get_invoice'         => wp_create_nonce( 'ccb_get_invoice' ), 		'ccb_wp_hook_nonce'       => wp_create_nonce( 'ccb_wp_hook_nonce' ),
AI Analysis
```
Vulnerability Existed: no
[No Vulnerability Detected]

Explanation:
This diff shows the removal of a nonce creation line for 'ccb_complete_payment'. The change itself is not introducing a vulnerability—it is removing nonce generation code.

However, this removal could potentially CREATE a vulnerability if:
1. The 'ccb_complete_payment' nonce was being used to validate payment completion requests
2. Removing its generation without updating the corresponding verification code would leave payment endpoints unprotected against CSRF attacks

Without seeing the complete context (whether the nonce verification code for this action was also removed, and what the payment flow looks like), this appears to be either:
- A legitimate cleanup of unused nonce generation, OR
- An incomplete fix that creates a CSRF vulnerability in payment handling

The diff alone shows code removal, not a vulnerable code pattern being introduced or fixed.
```

**Note:** To properly assess if this creates a vulnerability, I would need to see:
1. Whether `wp_verify_nonce( $_REQUEST['ccb_complete_payment'] )` or similar verification still exists in the codebase
2. What endpoints use the payment completion action
3. Whether this nonce was actually being validated in payment processing

If the nonce verification for 'ccb_complete_payment' still exists in the code but the generation was removed, this would be a **Cross-Site Request Forgery (CSRF) - CWE-352** vulnerability.
CVE Analysis Results:
CVE-2025-14757: No
View CVE Description
The Cost Calculator Builder plugin for WordPress is vulnerable to Unauthenticated Payment Status Bypass in all versions up to, and including, 3.6.9 only when used in combination with Cost Calculator Builder PRO. This is due to the complete_payment AJAX action being registered via wp_ajax_nopriv, making it accessible to unauthenticated users, and the complete() function only verifying a nonce without checking user capabilities or order ownership. Since nonces are exposed to all visitors via window.ccb_nonces in the page source, any unauthenticated attacker can mark any order's payment status as "completed" without actual payment.