Security Issues With Accept Stripe Payments WordPress Plugin
Earlier today a topic was created on the WordPress support forum for the plugin Accept Stripe Payments questioning whether there was a security hole in the plugin:
We’ve had hundreds of small fake charges to random people made by our Stripe account. I even got some calls from random people asking why we charged them! This is due to some fraudsters using our Stripe API key for card testing (testing whether a stolen card is valid).
I’m suspecting that the “Accept Stripe Payments” plugin may have some security problem that exposes the API key, because we changed our API key so the fake charges ceased, then configured it in this WordPress plugin to continue accepting Stripe payments in our page, and then we got spammed again with fake charges to random people.
Could the authors of the plugin please look into it?
In a quick check over the plugin we didn’t find anywhere the API key was obviously being leaked, but we did find an unrelated minor security vulnerability.
We also found what might be considered a security issue, as the plugin allows creating payment mechanism through a shortcode, which makes that capability available to anyone logged in to WordPress, not just users with access to create a post or page.
Getting back to the vulnerability, the plugin makes the capability to clear its debug log accessible to anyone logged in to WordPress through WordPress’ AJAX functionality:
226 | add_action( 'wp_ajax_asp_clear_log', array( 'ASP_Debug_Logger', 'clear_log' ) ); |
The function called by that clear_log, in the file /includes/class-asp-debug-logger.php, doesn’t do any security checks before clearing the log:
102 103 | public static function clear_log() { if ( self::log( "Stripe Payments debug log reset\r\n", true, '', true ) !== false ) { |
There should be both a capabilities check and a nonce check before doing that. The lack on a nonce check also allows cross-site request forgery (CSRF) to occur.
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 clear the plugin’s debug log, when logged in to WordPress.
Replace “[path to WordPress]” with the location of WordPress.
http:///wp-admin/admin-ajax.php?action=asp_clear_log