# WooCommerce Amazon Pay <= 2.6.3 - Unauthenticated Insecure Direct Object Reference to Order Modification via Amazon Pay Return Handler

- **ID:** WPSEC-2026-2031
- **Plugin:** Amazon Pay for WooCommerce (`woocommerce-gateway-amazon-payments-advanced`), https://wordpress.org/plugins/woocommerce-gateway-amazon-payments-advanced/
- **Affected versions:** all versions before 2.6.4
- **Fixed in:** 2.6.4 (Update to 2.6.4 or later.)
- **Severity:** Medium 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-639
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-30)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/woocommerce-gateway-amazon-payments-advanced
- **Fix released:** 2026-10-29
- **Published:** 2026-10-30
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2031/

## Description

The Amazon Pay for WooCommerce plugin for WordPress is vulnerable to Insecure Direct Object Reference via the Amazon Pay return handler (handle_return) in all versions up to, and including, 2.6.3, due to the handler taking the order ID from the order-pay endpoint without validating the order key or the pay_for_order capability, and not verifying that a classic checkout session was created for that order. This makes it possible for unauthenticated attackers to apply their own Amazon checkout session to another customer's pending order, overwriting its billing and shipping addresses with their own and, when the totals match, completing payment for that order.

## References

- https://wpsec.com/vuln/WPSEC-2026-2031/
- https://plugins.svn.wordpress.org/woocommerce-gateway-amazon-payments-advanced/tags/2.6.4/
- https://wordpress.org/plugins/woocommerce-gateway-amazon-payments-advanced/

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

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.
