GDPR Functionality in WordPress Plugin WP Live Chat Support Allows Anyone to Download Contents of Chats Handled Through It
Yesterday Sucuri disclosed a settings change vulnerability that leads to a persistent cross-site scripting (XSS) in the plugin WP Live Chat Support, which was also fixed yesterday. That vulnerability is likely to be exploited soon. As we started looking over things while adding the vulnerabilities to our data set yesterday, so we could warn the customers of our service if they are using an impacted versions, we found that there are multiple additional security issues caused in part the same security issue that was partially fixed (yes, even the vulnerability fixed, was only actually partially fixed). There is, for example, another setting change vulnerability, though one that doesn’t look to lead to a more serious vulnerability. What stood out more for the seriousness, but also what type of functionality the vulnerability is in, is an information disclosure vulnerability that exposes chat logs and meta data related to those chats to anyone, which occurs through General Data Protection Regulation (GDPR) functionality. So functionality related to data protection does the opposite.
The GDPR functionality already was implicated in two vulnerabilities, based on the changelog entries for previous versions of the plugin:
- Fixed XSS attack in GDPR page
- Fixed XSS vulnerability within the GDPR search system (Thanks to Tim Coen)
The latter is one that we detailed for our customers and already in our data set (with the vulnerability we are disclosing here, we are up to 9 vulnerabilities for this plugin in our data set), the former is claimed to have been fixed in the latest version and we are in the process of looking into that.
It seems advisable to not use this plugin unless the security is thoroughly overhauled.
The running of the vulnerable code in this instance starts with the same hook as the vulnerability disclosed by Sucuri, admin_init:
224 | add_action('admin_init', 'wplc_gdpr_admin_init', 1); |
When registered that way the specified function can run even when not logged in to WordPress and that registration causes the function wplc_gdpr_admin_init() to run:
229 230 231 232 233 | function wplc_gdpr_admin_init(){ wplc_gdpr_check_for_cron(); if(isset($_GET['page']) && $_GET['page'] === 'wplivechat-menu-gdpr-page'){ do_action('wplc_gdpr_page_process_actions_hook'); |
When that code runs if the GET input “page” equals “wplivechat-menu-gdpr-page” the action “wplc_gdpr_page_process_actions_hook” will then run. That will in turn cause the function wplc_gdpr_page_process_actions() to run:
238 | add_action('wplc_gdpr_page_process_actions_hook', 'wplc_gdpr_page_process_actions'); |
With that function, if the GET input “action” is set to “download” the function wplc_gdpr_download_chat() will run and provide a download of the chat with the ID specified by the GET input “id”:
242 243 244 245 246 247 248 249 250 251 | function wplc_gdpr_page_process_actions(){ if(isset($_GET['action']) && isset($_GET['filter']) && isset($_GET['id'])){ $action = sanitize_text_field($_GET['action']); $filter = sanitize_text_field($_GET['filter']); $id = sanitize_text_field($_GET['id']); if($action === 'delete'){ wplc_gdpr_delete_chat($filter, $id); } else if($action === 'download'){ wplc_gdpr_download_chat($filter, $id); |
There are no security checks done in wplc_gdpr_download_chat() and it also isn’t using prepared statements when using user input in SQL statements.
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:
Proof of Concept
The follow proof of concept will provide a JSON encoded copy of the chat log for the chat with ID 1.
Make sure to replace “[path to WordPress]” with the location of WordPress.
http://[path to WordPress]/wp-admin/admin-post.php?page=wplivechat-menu-gdpr-page&action=download&filter=chat_session&id=1
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.
Hi there,
WP-Live Chat here. We received your query in regards to the said vulnerability which seems to have existed for quite a while. We made a fix which as you’ve seen was mentioned in the changelogs but didn’t take in consideration much older PRO users.
We are preparing a fix for this now and will be uploading a new build to wordpress.org the soonest. The moderator’s behavior on the forums is quite unfortunate as he seems to disallow certain things from being posted, including your latest notification of the security vulnerability.
We’ve taken a huge direction change with this plugin and hoped we’d be able to actively work on some of it’s shortcomings, but this is becoming increasingly hard as there’s no way to contact the specific moderator to have a simple discussion like adults. We’ve received no notifications of our plugin being disabled.
We are actually very dedicated to our work and take these things very seriously.
As an update to my previous comment. The update with the fix has now been submitted to wordpress.org.