7 Mar 2022

WordPress Plugin Targeted by Hacker Currently Contains Authenticated Settings Change Vulnerability

On Saturday we had what looked to be a hacker probing for usage of the WordPress plugin WPCargo, which has 10,000+ installs, on our website. While there is a vulnerability that was recently fixed that could explain a hacker targeting the plugin, we did a quick check over the plugin. We found the plugin is lacking basic security and contains multiple security vulnerabilities. The simplest to confirm and explain is an authenticated settings change vulnerability. We would recommend not using the plugin unless it has had a thorough security review done and all the issues found addressed.

The plugin register the function update_import_option_ajax_request() to be accessible through WordPress’ AJAX functionality to anyone logged in to WordPress:

9
add_action( 'wp_ajax_update_import_option_ajax_request',  array($this,'update_import_option_ajax_request') );

That function, which is located in the file /admin/classes/class-wpc-export-extend.php, will update the WordPress option (setting) multiselect_settings to the value of the GET or POST input multiselect_settings:

67
68
69
70
function update_import_option_ajax_request() {
	// The $_REQUEST contains all the data sent via ajax
	if ( isset($_REQUEST) ) {
		update_option('multiselect_settings', $_REQUEST['multiselect_settings'], true);

The code lacks a capabilities check to restrict who has access, a nonce check to prevent cross-site request forgery (CSRF), and probably code restricting what can be set to the setting.

That setting is loaded elsewhere in the plugin, but doesn’t appear to be used.

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.

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).

If the moderation is cleaned up, it would also allow the possibility of being able to use the forum to start discussing fixing the problems caused by the very problematic handling of security by the team running the Plugin Directory, discussions which they have for years shut down through their control of the Support Forum.

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 cause the WordPress option multiselect_settings to be set to proofofconcept.

Replace “[path to WordPress]” with the location of WordPress.

http://[path to WordPress]/wp-admin/admin-ajax.php?action=update_import_option_ajax_request&multiselect_settings=proofofconcept

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.