Our Plugin Security Checker allows anyone to check for the possibility of some instances of security vulnerabilities in WordPress plugins. While the tool is something we would describe as being far from advanced in what it can do, with the current state of security with WordPress plugins it has been able to spot vulnerabilities even in fairly popular plugins. That is the case with the plugin Breeze, which has 70,000+ installs, where it flagged the possibility of an open redirect vulnerability, which a quick check confirmed was an authenticated variant of that, which makes it of limited concern, though it is something that could have been easily avoided.
The tool identified the following two lines of code as possibly leading to an open redirect:
That is due to user input being used to specify a URL to redirect to through the wp_redirect() function. It looks like the redirect is only intended to be to a page on the website, so an open redirect could be avoided by using the wp_safe_redirect() function instead, which restricts where the redirect can occur to.
In looking at the code that runs before each of those lines of code, the first instance couldn’t be exploited due to it running after a valid nonce was checked for.
The second will run if the function it is located in, afterLoadConfigPage(), runs. That function runs when the plugin’s setting page is loaded:
add_action( 'load-settings_page_breeze', array($this,'afterLoadConfigPage') );
Access to that page is restricted to those with the “manage_options” capability:
add_submenu_page( 'options-general.php', __('Breeze', 'breeze'), __('Breeze', 'breeze'), 'manage_options', 'breeze', array($this, 'breeze_load_page') );
So normally the open redirect can only be exploited against Administrators.
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 redirect you to our homepage, when logged in to WordPress.
Make sure to replace “[path to WordPress]” with the location of WordPress.
http://[path to WordPress]/wp-admin/options-general.php?page=breeze&_wp_http_referer=https://www.pluginvulnerabilities.com/?