Skip to content

Security Release - #101

Merged
Abraham-Flutterwave merged 11 commits into
Flutterwave:devfrom
bajoski34:dev
Sep 17, 2026
Merged

Abraham-Flutterwave merged 11 commits into
Flutterwave:devfrom
bajoski34:dev

Conversation

@bajoski34

Copy link
Copy Markdown
Contributor
  • [SECURITY] Authenticate the payment callback (?wc-api=flw_wc_payment_gateway) against the order key. The endpoint previously accepted any order ID, so an unauthenticated request could cancel or fail arbitrary pending orders (CWE-288 / CWE-306).
  • [SECURITY] Confirm a cancellation with Flutterwave before changing an order. A client-supplied status=cancelled no longer moves an order on its own.
  • [SECURITY] Bind each callback to a transaction reference this store issued for that order, so a reference from another order cannot be replayed.
  • [SECURITY] Ignore callbacks for orders that are no longer awaiting payment, making repeat callbacks inert.
  • [SECURITY] Compare the webhook verif-hash with hash_equals(), and reject webhooks when no secret hash is configured.
  • [SECURITY] Reject replayed webhooks by recording the Flutterwave transaction id already processed for an order (CWE-294).
  • [SECURITY] Encrypt the stored Flutterwave card token at rest instead of keeping it as plaintext order meta.
  • [SECURITY] Stop writing the full webhook body, which contains customer PII, to the WooCommerce log unless logging is explicitly enabled.
  • [SECURITY] Scope checkout nonces to the order they belong to rather than validating against the default action.
  • [SECURITY] Orders with no recorded transaction reference now only accept a reference issued in that order's name (WOOC_<order id>_…), rather than any reference.
  • [FIXED] Preserve callback parameters on stores using plain permalinks, where the return URL previously lost them.
  • [FIXED] Store order metadata through the CRUD API so transaction references and payment tokens work under HPOS.
  • [FIXED] Correct the plugin header, which declared a WooCommerce floor above its own "tested up to" version.
  • [FIXED] A successful Flutterwave charge that completes after its order was cancelled now reopens the order (after confirming the charge with Flutterwave) instead of being rejected as "Order already processed", which left customers charged with nothing fulfilled.
  • [CHANGED] Update the JavaScript and PHP toolchains; the build now requires Node 24.
  • [REMOVED] Unreferenced express-checkout scaffolding (client/blocks/payment-request/) and the unused flutterwave-react-v3, gridicons and @automattic/interpolate-components dependencies, which pulled a vulnerable axios into the dependency tree without reaching the build.

bajoski34 and others added 11 commits September 14, 2026 17:33
The public callback (?wc-api=flw_wc_payment_gateway) gated on
!isset($_GET['_wpnonce']) && !wp_verify_nonce(...), so any _wpnonce value
skipped verification and an unauthenticated GET could cancel any order by
sequential id.

- Authenticate the callback against the order key and require the order
  to use the Flutterwave gateway.
- Bind tx_ref to references issued for that order; orders with no stored
  reference only accept WOOC_<order id>_<suffix>.
- Confirm cancellations with Flutterwave before changing an order, and
  ignore callbacks for orders no longer awaiting payment.
- Let the webhook reopen a cancelled order when a verified successful
  charge arrives, instead of rejecting it as already processed.
- Compare verif-hash with hash_equals(), reject webhooks when no secret
  hash is configured, and drop replayed webhooks.
- Encrypt the stored card token at rest and keep webhook PII out of logs
  unless logging is enabled.
- Scope checkout nonces to the order; fix callback URLs on plain
  permalinks; write order meta through the CRUD API for HPOS.
- Bump version to 3.3.1 and add the release notes.
- Remove the unreferenced express-checkout scaffolding in
  client/blocks/payment-request/ and the unused flutterwave-react-v3,
  gridicons and @automattic/interpolate-components dependencies, which
  pulled a vulnerable axios into the dependency tree without reaching
  the build.
- Upgrade the JavaScript dev toolchain (@wordpress/scripts, webpack,
  Playwright and friends) and require Node 24 via .nvmrc and engines.
- Upgrade the PHP dev toolchain to WPCS 3, PHPCompatibilityWP 2.1 and
  phpunit-polyfills 2, run tests with PHPUnit, and rename the short
  ternary sniff exclusion for WPCS 3.
- Bump GitHub Actions (checkout, cache, setup-node, codecov,
  composer-install) to current majors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants