Recently Closed WordPress Plugin with 60,000+ Installs Contains Authenticated Persistent XSS Vulnerability
Yesterday, the WordPress plugin Post Gird was closed on WordPress Plugin Directory. Because that is one of the 1,000 most popular plugins in that directory (it has 60,000+ installs), our systems warned us about the closure and we started checking over the plugin to see if there was a vulnerability we should warn customers of our services about. What we found was that it at least contains an authenticated persistent cross-site scripting (XSS) vulnerability.
When creating or editing one of the plugin’s post grids, there is the option to include custom JavaScript code. If that were limited to users with the unfiltered_html capability, that wouldn’t be an issue, since they are intended to be able to add JavaScript code. But that post type is accessible to users without that capability, as it possible for any users that are able to create WordPress posts:
25 | register_post_type( "post_grid", |
47 | 'capability_type' => 'post', |
In normal circumstances, that would mean that users with the Contributor and Author role could add JavaScript code while not being intended to be able to do that, which is an authenticated persistent XSS vulnerability.
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
Creating a post grid as a user with the Contributor role, which doesn’t have the unfiltered_html capability, with the following custom JavaScript will cause an alert box with any available cookies to be shown when accessing the page created by the Contributor.
alert(document.cookie);