# Better Payment <= 2.4.1 - Unauthenticated Open Redirect via PayPal 'return' and 'cancel_return' Parameters

- **ID:** WPSEC-2026-1009
- **Plugin:** Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More (`better-payment`), https://wordpress.org/plugins/better-payment/
- **Affected versions:** all versions before 2.4.2
- **Fixed in:** 2.4.2 (Update to 2.4.2 or later.)
- **Severity:** Medium 4.7 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-601
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-15)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/better-payment
- **Fix released:** 2026-10-14
- **Published:** 2026-10-15
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1009/

## Description

The Better Payment plugin for WordPress is vulnerable to Open Redirect via the 'return' and 'cancel_return' parameters of the Elementor form's PayPal handler in all versions up to, and including, 2.4.1, due to the URLs being passed to PayPal after only esc_url_raw(), without a check that they point to the site. The handler is open to logged-out users and its nonce is printed on the public payment form. This makes it possible for unauthenticated attackers to send a logged-out visitor who submits a crafted payment form through PayPal to an arbitrary external site once the payment is completed or cancelled.

## References

- https://wpsec.com/vuln/WPSEC-2026-1009/
- https://plugins.svn.wordpress.org/better-payment/tags/2.4.2/
- https://wordpress.org/plugins/better-payment/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1009/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
