Unfixed Persistent Cross-Site Scripting (XSS) Vulnerability in WordPress Plugin Targeted by Hacker
Today, we had someone probing for usage of the WordPress plugin MultiParcels Shipping For WooCommerce through a request for the plugin’s readme.txt file on one of our websites.
On July 17, a vague claim that an authenticated SQL injection vulnerability had recently been fixed in the plugin was released, which might explain a hacker’s interest in the plugin. There is also a claim that a minor vulnerability that has not been fixed yet exists in the plugin.
In a quick check over the latest version of the plugin, 1.15, for the types of issues hackers are known to find and exploit, we found the plugin looks to be lacking basic security and we confirmed that it at least contains one instance of a vulnerability that hackers are known to find and exploit, a persistent cross-site scripting (XSS) vulnerability.
We tested and confirmed that our firewall plugin for WordPress protected against exploitation of this vulnerability, even before we discovered the vulnerability, as part of its protection against zero-day vulnerabilities.
We warned members of our zero-day vulnerability exploitation info sharing partnership of this vulnerability earlier today.
Persistent Cross-Site Scripting (XSS)
In the file /includes/class-mp-admin.php, the function settings_init() is registered to be run during admin_init, making it accessible to even those not logged in:
44 | add_action('admin_init', [$this, 'settings_init']); |
There are no security checks done in that function.
In the function, code saves user input to the plugin’s setting default_sender_location without sanitizing it:
411 412 | if ( array_key_exists( 'set_sender_location', $_GET ) ) { MultiParcels()->options->set('default_sender_location', $_GET['set_sender_location']); |
That value is output without escaping on the plugin’s settings page:
2212 | <input type="hidden" name="multiparcels_settings[default_sender_location]" value="<?php echo MultiParcels()->options->get('default_sender_location');?>"> |
The proof of concept below confirms that can be used to cause cross-site scripting (XSS) to occur.
WordPress Causes Full Disclosure
As a protest of the moderators of the WordPress Support Forum’s continued inappropriate behavior we changed from reasonably disclosing to full disclosing vulnerabilities for plugins in the WordPress Plugin Directory 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. (For plugins that are also in the ClassicPress Plugin Directory, we will follow our reasonable disclosure policy.)
You can notify the developer of this issue on the forum as well.
After four years, the moderators have finally tacitly admitted they were behaving inappropriately and have made moves to fix the problems (though incompletely), so these full disclosures can be ended if they simply restore access to our accounts and plugins in the Plugin Directory. Hopefully that takes less than four years.
Proof of Concept
The following proof of concept will cause an alert box with available cookies to be shown when visiting the plugin’s setting page, /wp-admin/admin.php?page=multiparcels-shipping-for-woocommerce.
Replace “[path to WordPress]” with the location of WordPress.
http://[path to WordPress]/wp-admin/admin-post.php?tab=sender-details&set_sender_location=%22%3E%3Cscript%3Ealert(document.cookie);%3C/script%3E