Vulnerability discovered in Elementor Pro 3.11.6

Did you perhaps receive this email from Elementor yesterday about a critical security vulnerability discovered in Elementor Pro versions 3.11.6? This vulnerability can be exploited if WooCommerce is also installed on your website. It contained the following message:

Email from Elementor

The following message has been translated from English into Dutch.

Dear customer,

We would like to inform you about a critical security vulnerability discovered in versions 3.11.6 and earlier of Elementor Pro. This vulnerability can be exploited if WooCommerce is also installed on your website.

To protect your website and ensure its security, we strongly recommend that you update your Elementor Pro plugin to the latest version immediately. Follow these simple steps to complete the update:

  • Log in to the WordPress admin dashboard.
  • Go to ‘Plugins’ in the left-hand menu.
  • Find Elementor Pro or PRO Elements in the list of installed plugins.
  • Click the ‘Update Now’ button to start the update process.

Once the update is complete, your website will be protected from the security vulnerability, and you can continue using Elementor Pro with confidence. If you encounter any issues or have questions during the update process, please don't hesitate to contact our support team. We're ready to help and ensure your website remains secure.

We apologize for any inconvenience this may cause and appreciate your prompt attention to this matter. Keeping your website secure is our top priority, and we continue to work hard to address any security issues and keep you informed.

Thank you for choosing our services and for your cooperation in maintaining a safe online environment.

Kind regards, the Dream-Theme team.

What does this vulnerability mean?

When Elementor Pro is installed on a site with WooCommerce enabled, the “elementor-pro/modules/woocommerce/module.php” component is loaded, which registers a series of AJAX actions:

				
					/**
 * Register Ajax Actions.
 *
 * Registers ajax action used by the Editor js.
 *
 * @since 3.5.0
 *
 * @param Ajax $ajax
 */
public function register_ajax_actions( Ajax $ajax ) {
   // `woocommerce_update_page_option` is called in the editor save-show-modal.js.
   $ajax->register_ajax_action( 'pro_woocommerce_update_page_option', [ $this, 'update_page_option' ] );
   $ajax->register_ajax_action( 'pro_woocommerce_mock_notices', [ $this, 'woocommerce_mock_notices' ] );
}
				
			

One of them is pro_woocommerce_update_page_option, which is used by Elementor's built-in editor. It calls update_option, a function that can be used to change WordPress options in the database, with two user inputs:

				
					/**
 * Update Page Option.
 *
 * Ajax action can be used to update any WooCommerce option.
 *
 * @since 3.5.0
 *
 * @param array $data
 */
public function update_page_option( $data ) {
   update_option( $data['option_name'], $data['editor_post_id'] );
}
				
			

This function is intended to allow the administrator or store manager to update some specific WooCommerce options, but the user input is not validated, and the function lacks a capability check to limit access to a privileged user.

Elementor uses its own AJAX handler to manage most of its AJAX actions, including pro_woocommerce_update_page_option, with the global elementor_ajax action. This is found in the “elementor/core/common/modules/ajax/module.php” script in the free version (which is required to run Elementor Pro):

				
					/**
 * Handle ajax request.
 *
 * Verify ajax nonce, and run all the registered actions for this request.
 *
 * Fired by `wp_ajax_elementor_ajax` action.
 *
 * @since 2.0.0
 * @access public
 */
public function handle_ajax_request() {
   if ( ! $this->verify_request_nonce() ) {
      $this->add_response_data( false, esc_html__( 'Token Expired.', 'elementor' ) )
         ->send_error( Exceptions::UNAUTHORIZED );
   }
   ...
				
			

We can see that it contains a nonce check that could potentially prevent bad actors from exploiting the vulnerability. However, the nonce and all the JS code associated with it are loaded via the admin_enqueue_scripts hook in “elementor/core/common/app.php”:

				
					add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] );

				
			

It is then exposed in the page source to all users who are logged in:

An authenticated attacker could exploit the vulnerability to create an administrator account by enabling registration (users_can_register) and setting the default role (default_role) to “administrator,” changing the administrator’s email address (admin_email), or, as shown below, redirecting all traffic to an external malicious website by changing the site URL, among other things:

MariaDB [example]> SELECT * FROM `wp_options` WHERE `option_name`='siteurl';
+-----------+-------------+------------------+----------+
| option_id | option_name | option_value     | autoload |
+-----------+-------------+------------------+----------+
|         1 | siteurl     | https://slechteurl.nl| yes      |
+-----------+-------------+------------------+----------+
1 row in set (0.001 sec)

Because the vulnerable component requires WooCommerce to be installed, an unauthenticated user can create a WooCommerce customer account, log in, and also exploit the vulnerability (WooCommerce customers can gain access to the backend by adding wc-ajax=1 to the query, for example https://example.com/wp-admin/?wc-ajax=1).

The vulnerability was discovered and reported to the authors on March 18, 2023, and a new version, 3.11.7, was released on March 22, 2023.

Solution for WP Provider

You don't have to do anything if you use managed hosting through WP Provider; your version 3.11.6 of Elementor Pro has been updated to the latest version.

Solution for users who are not WP Provider customers

The solution is to update to the new version 3.11.7 of Elementor Pro as soon as possible. Always check whether the latest versions are compatible with the plugins and themes you use.

If you currently host several WordPress websites and don't do so through us, you can use one of our WordPress bash scripts, which can be found on our Github page.

For example, use our bash script to see which websites are still running version 3.11.6: https://github.com/wpprovider/bash-scripts/blob/main/check-elementor-pro-version.sh

And to make it even easier, use the following bash script to also update these websites to 3.11.7: https://github.com/wpprovider/bash-scripts/blob/main/update-specific-elementor-pro-version.sh

Learn more about this vulnerability directly from the source.

Request web hosting

Request your hosting account below!

Request a benchmark now

Do you feel like your website could be faster? Let us run a benchmark. We guarantee that your website will run faster on our hosting!