# PayHere Payment Gateway <= 2.4.5 - Missing Authorization to Payment Capture

- **ID:** WPSEC-2026-2169
- **Plugin:** PayHere Payment Gateway (`payhere-payment-gateway`), https://wordpress.org/plugins/payhere-payment-gateway/
- **Affected versions:** all versions before 2.4.6
- **Fixed in:** 2.4.6 (Update to 2.4.6 or later.)
- **Severity:** Medium 4.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-862
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-31)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/payhere-payment-gateway
- **Fix released:** 2026-10-30
- **Published:** 2026-10-31
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2169/

## Description

The PayHere Payment Gateway plugin for WordPress is vulnerable to unauthorized modification of data via the payhere_capture AJAX action (capture_payment() function) in all versions up to, and including, 2.4.5, due to a missing capability check and missing nonce validation. This makes it possible for authenticated attackers, with Subscriber-level access and above, to capture authorized (held) PayHere payments for arbitrary orders, an action meant only for store managers.

## References

- https://wpsec.com/vuln/WPSEC-2026-2169/
- https://plugins.svn.wordpress.org/payhere-payment-gateway/tags/2.4.6/
- https://wordpress.org/plugins/payhere-payment-gateway/

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

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.
