WooCommerce Payments Plugin Patches Critical Vulnerability That Would Allow Site Takeover

WooCommerce Payments, a plugin that allows WooCommerce store owners to accept credit and debit card payments and manage transactions inside the WordPress dashboard, has patched an Authentication Bypass and Privilege Escalation vulnerability with a 9.8 (Critical) CVSS score. The plugin is active on more than 500,000 websites.

Beau Lebens, WooCommerce’s Head of Engineering, published an advisory about the vulnerability today, which he said “could permit unauthorized admin access to impacted stores” if exploited. It was discovered by a security researcher participating in WooCommerce’s HackerOne program.

WooCommerce worked with WordPress.org to push out a forced update for sites running WooCommerce Payments versions 4.8.0 through 5.6.1 to patched versions. Many store owners have automatic updates turned off to ensure proper testing before updating. Now that the vulnerability has been made public, it is imperative that all stores running version 4.8.0+ of the plugin update manually as soon as possible. WooCommerce sites hosted on WordPress.com, Pressable, and WPVIP have already been patched.

At this time WooCommerce does not have any evidence of the vulnerability being exploited but the plugin’s engineers recommend checking for any unexpected admin users or posts addd to the site. The advisory includes further details of what to do if you believe your site has been impacted. As a cautionary measure, WooCommerce has temporarily disabled the WooPay beta program since the vulnerability impacts this new checkout service they have been beta testing.

6

6 responses to “WooCommerce Payments Plugin Patches Critical Vulnerability That Would Allow Site Takeover”

  1. Reading the code changes, the vulnerability is “any logged-in user can trivially (no coding even required – a beginner armed with a simple web browser extension can do it in a few seconds) change his logged-in user ID to that of any other user, i.e. can log in as any other user (including admins)”.

  2. David, actually this can be exploited by anonymous users as well, you don’t need to be logged in. You just add a header to a request and that will authenticate that request as any user ID. So you could send a POST request to the users API and create an admin as an anonymous user.

    • Here it is in the wild:

      212.113.119.6 – – [28/Mar/2023:22:46:22 +1100] “POST /wp-json/wp/v2/plugins HTTP/1.1” 500 96 “https://***/” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0”
      212.113.119.6 – – [28/Mar/2023:22:46:28 +1100] “POST /wp-json/wp/v2/pages HTTP/1.1” 500 96 “https://***/wp-json/wp/v2/plugins” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0”

      First hit on the 28th did not work.
      Two days later:
      212.113.119.6 – – [30/Mar/2023:16:46:55 +1100] “POST /wp-json/wp/v2/plugins HTTP/1.1” 201 647 “https://***/” “Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko”
      212.113.119.6 – – [30/Mar/2023:16:47:04 +1100] “POST /wp-json/wp/v2/pages HTTP/1.1” 200 3154 “https://***/wp-json/wp/v2/plugins” “Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko”
      212.113.119.6 – – [30/Mar/2023:16:47:06 +1100] “GET /02385bb27cb2.php HTTP/1.1” 200 27 “https://***/wp-json/wp/v2/pages” “Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko”

      Used to add a plugin “evalphp” to wordpress at this exact time, which was then used to pivot for full control with the “02385…” upload script.

      This was on a test site running wordpress 6.1.1, woocommerce 7.3.0, payments module 5.4.0. NO OTHER PLUGINS it was prettymuch a stock standard install, that was reasonably up to date.

      As far as i’m aware the rest-api doesn’t add plugins, so i have zero idea how this was leveraged to add evalphp at the exact time the POST was sent.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.