4 Nov 2019

Recently Closed WordPress Plugin with 70,000+ Installs Contains Authenticated Persistent XSS Vulnerability

The plugin Easy Columns was closed on the WordPress Plugin Directory on Sunday of last week. That is one of the 1,000 most popular plugins with 70,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 an authenticated persistent cross-site scripting (XSS) after looking at results that our Plugin Security Checker produced for the plugin.

An example of that issue involves the plugin’s ezcol_1quarter shortcode, which calls the function one_quarter():

85
add_shortcode('ezcol_1quarter', array(&$this, 'one_quarter'));

That function will pass the shortcode attributes to the function div_atts() and cause the result of that to be output:

143
144
145
function one_quarter($atts, $content = null) {
	return '<div' . $this->div_atts($atts,'ezcol-one-quarter') . '>'.$this->strip_autop($content).'</div>';
}

That function doesn’t sanitize the shortcode attributes before adding them to what is returned by the function:

211
212
213
214
215
216
217
218
219
220
221
function div_atts($atts,$col_type) {
	extract(shortcode_atts(array('id' => '','class' => '','style' => ''),$atts));
	$att_str = ' class="ezcol';
	$att_str .= (!empty($col_type))? ' '.$col_type : '';
	$att_str .= (!empty($col_type) && !empty($class))? ' ' : '';
	$att_str .= (!empty($class))? ' '.$class : '';
	$att_str .= '"';
	$att_str .= (!empty($id))? ' id="'.$id.'"' : '';
	$att_str .= (!empty($style))? ' style="'.$style.'"' : '';
	return $att_str;
}

As the proof of concept below confirms, users with the “unfiltered_html” capability can abuse that to cause JavaScript code to run on posts, which is an authenticated persistent cross-site scripting (XSS) vulnerability.

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

When logged in as an Author-level user placing the following proof of concept on a post will cause an alert box with any available cookies to be shown in an alert box when mousing over “Proof of Concept” on the post.

 [ezcol_1quarter id="" class='" onmouseover="alert(document.cookie)' style=""]Proof of Concept[/ezcol_1quarter]

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.

Leave a Reply

Your email address will not be published.