Kalpa-Services / mmg-wp-plugin

WooCommerce Gateway that uses the MMG Checkout API to process payments
https://mmg-plugin.kalpa.dev
GNU General Public License v2.0
4 stars 2 forks source link

CVE-601: Open Redirect #59

Closed carlHandy closed 1 month ago

carlHandy commented 1 month ago

Unsanitized input from data from a remote resource flows into window.location, where it is used as an URL to redirect the user. This may result in an Open Redirect vulnerability.


 success: function(response) {
                if (response.success && response.data.checkout_url) {
                    window.location.href = response.data.checkout_url;

Link to code: https://github.com/Kalpa-Services/mmg-wp-plugin/blob/5ed3af147c036b2004efe12629fd6560a65a8724/js/mmg-checkout.js#L21