WPIntell

Source evidence

Stripe Secret Key is exposed in the front-end

FundPress – WordPress Donation Plugin · support · 2019-03-12T19:17:00+00:00

complaintsentiment
highseverity
1.0relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 29 rows with source links

17.2% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

24 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
johnnydarkko unresolved
The following file plugs the secret key into the front end: wp-content/plugins/fundpress/inc/gateways/stripe/class-dn-payment-stripe.php (Line 270). Upon inspection of the source for a page, the following is exposed the front end: var Donate_Stripe_Settings = {“Secret_Key”:”sk_live_[key redacted]”} This information should NOT be publicly exposed. I found that removing line 270 of that code that adds the stripe data script addresses the issue. Tested and verified that payments are going through successfully on our site. Might need more insight from the plugin developer here. This is still an issue, even after upgrading to latest 1.8 version, which supposedly was released specifically to address this vulnerability. The new updates don’t have the exact same settings, but the end result is still an exposure and leaking of secret and publish keys on the website (ie, /cart page). 260 if ( !$this->is_enable ) 261 return; 262 263 $stripe = apply_filters( ‘donate_stripe_payment_object’, array( 264 ‘Secret_Key’ => $this->secret_key, 265 ‘Publish_Key’ => $this->publish_key, 266 ‘key_missing’ => __( ‘Stripe key is expired. Please contact administrator to do this payment gateway’, ‘fundpress’ ) 267 ) ); 268 269 wp_register_script( ‘donate_payment_stripe’, TP_DONATE_INC_URI . ‘/gateways/stripe/jquery.payment.min.js’, array(), TP_DONATE_VER, true ); 270 wp_localize_script( ‘donate_payment_stripe’, ‘Donate_Stripe_Settings’, $stripe ); 271 272 wp_enqueue_script( ‘donate_payment_stripe’ ); 273 }

Comments

2 shown
johnnydarkko 2019-03-12T21:17:00+00:00

I found that removing line 270 of that code that adds the stripe data script addresses the issue. Tested and verified that payments are going through successfully on our site. Might need more insight from the plugin developer here.

whallify 2019-03-19T16:08:00+00:00

This is still an issue, even after upgrading to latest 1.8 version, which supposedly was released specifically to address this vulnerability. The new updates don’t have the exact same settings, but the end result is still an exposure and leaking of secret and publish keys on the website (ie, /cart page). 260 if ( !$this->is_enable ) 261 return; 262 263 $stripe = apply_filters( ‘donate_stripe_payment_object’, array( 264 ‘Secret_Key’ => $this->secret_key, 265 ‘Publish_Key’ => $this->publish_key, 266 ‘key_missing’ => __( ‘Stripe key is expired. Please contact administrator to do this payment gateway’, ‘fundpress’ ) 267 ) ); 268 269 wp_register_script( ‘donate_payment_stripe’, TP_DONATE_INC_URI . ‘/gateways/stripe/jquery.payment.min.js’, array(), TP_DONATE_VER, true ); 270 wp_localize_script( ‘donate_payment_stripe’, ‘Donate_Stripe_Settings’, $stripe ); 271 272 wp_enqueue_script( ‘donate_payment_stripe’ ); 273 }