-
-
Notifications
You must be signed in to change notification settings - Fork 523
Open
Description
Is your feature request related to a problem?
Following the widespread vulnerability of WooCommerce Payments, I tried testing the vulnerable code against WPCS -- but WPCS reported nothing.
if ( ! isset( $_SERVER['HTTP_X_WCPAY_PLATFORM_CHECKOUT_USER'] ) || ! is_numeric( $_SERVER['HTTP_X_WCPAY_PLATFORM_CHECKOUT_USER'] ) ) {
return null;
}
return (int) $_SERVER['HTTP_X_WCPAY_PLATFORM_CHECKOUT_USER'];Describe the solution you'd like
I suggest adding a similar check that exists for $_POST: WordPress.Security.NonceVerification.Missing.
Additional context (optional)
- https://developer.woocommerce.com/2023/03/23/critical-vulnerability-detected-in-woocommerce-payments-what-you-need-to-know/
- I have a HackerOne report (ID 1906271) involving Automattic's software on this.
Reactions are currently unavailable