-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The dispatcher's allowlist was the set of method names on its own class.\n\nThe entry point is WooCommerce's own public-by-design AJAX action:\n\n```\nGET /?wc-ajax=update_order_review\n```\n\nIt 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`:\n\n```php\nadd_action( 'woocommerce_checkout_update_order_review', array( __CLASS__, 'check_actions' ), - 10 );\n```\n\n`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:\n\n```php\npublic static function check_actions( $data ) {\n if ( empty( $data ) ) {\n return;\n }\n parse_str( $data, $post_data );\n if ( empty( $post_data ) || ! isset( $post_data['wfacp_input_hidden_data'] ) || empty( $post_data['wfacp_input_hidden_data'] ) ) {\n return;\n }\n\n $bump_action_data = json_decode( $post_data['wfacp_input_hidden_data'], true );\n\n if ( empty( $bump_action_data ) ) {\n return;\n }\n self::$posted_data = $post_data;\n $action = $bump_action_data['action'];\n\n $input_data = array();\n if ( isset( $bump_action_data['data'] ) ) {\n $input_data = $bump_action_data['data'];\n }\n if ( 'apply_coupon_field' == $action || 'apply_coupon_main' == $action ) {\n self::$output_resp = self::apply_coupon( $bump_action_data );\n } elseif ( 'remove_coupon_field' == $action || 'remove_coupon_main' == $action ) {\n self::$output_resp = self::remove_coupon( $bump_action_data );\n } elseif ( method_exists( __CLASS__, $action ) ) {\n self::$output_resp = self::$action( $input_data );\n }\n ...\n}\n```\n\nTwo 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.\n\n`grep \"static function\" class-wfacp-ajax-controller.php` enumerates the dispatcher's effective allowlist on the vulnerable build:\n\n```\ninit\nhandle_public_ajax\ncheck_actions\nmerge_fragments\nget_available_public_endpoints\nget_public_endpoints\ncheck_nonce\nsend_resp\nupdate_global_settings_fields\nupdate_cart_item_quantity\nupdate_cart_multiple_page\napply_coupon\nremove_coupon\nprep_fees\nremove_cart_item\nundo_cart_item\nget_divi_form_data\nanalytics\n```\n\nEighteen 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`.\n\n## update_global_settings_fields was registered on a different hook with a different trust model.\n\nThe same controller, eleven lines above the dispatcher, registers `update_global_settings_fields` as the callback for an admin action:\n\n```php\nadd_action( 'bwf_global_save_settings_wfacp', array( __CLASS__, 'update_global_settings_fields' ) );\n```\n\n`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:\n\n```php\npublic static function update_global_settings_fields( $options ) {\n\n $options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;\n $resp = array(\n 'status' => false,\n 'msg' => __( 'Changes saved', 'funnel-builder' ),\n );\n\n if ( ! is_array( $options ) || count( $options ) === 0 ) {\n return $resp;\n }\n\n $options['wfacp_checkout_global_css'] = isset( $options['wfacp_checkout_global_css'] ) ? stripslashes_deep( $options['wfacp_checkout_global_css'] ) : '';\n $options['wfacp_global_external_script'] = isset( $options['wfacp_global_external_script'] ) ? stripslashes_deep( $options['wfacp_global_external_script'] ) : '';\n\n update_option( '_wfacp_global_settings', $options, true );\n do_action( 'wfacp_global_settings_updated', $options );\n $resp['status'] = true;\n\n return $resp;\n}\n```\n\n`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.\"\n\nThe 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.\n\n## The write target is rendered as a `\"}}'\n```\n\nThe 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.\n\nThe `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](/patterns/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.\n\n## The patch is a five-entry array, an in-method capability check, and a comment that silences FunnelKit's own static-analysis rule.\n\nThe 3.15.0.3 controller adds three changes. The first is the missing allowlist at the dispatcher:\n\n```diff\n-\t\t} elseif ( method_exists( __CLASS__, $action ) ) {\n+\t\t$allowed_actions = array(\n+\t\t\t'update_cart_item_quantity',\n+\t\t\t'update_cart_multiple_page',\n+\t\t\t'remove_cart_item',\n+\t\t\t'undo_cart_item',\n+\t\t\t'prep_fees',\n+\t\t);\n+\n+\t\tif ( 'apply_coupon_field' == $action || 'apply_coupon_main' == $action ) {\n+\t\t\tself::$output_resp = self::apply_coupon( $bump_action_data );\n+\t\t} elseif ( 'remove_coupon_field' == $action || 'remove_coupon_main' == $action ) {\n+\t\t\tself::$output_resp = self::remove_coupon( $bump_action_data );\n+\t\t} elseif ( is_string( $action ) && in_array( $action, $allowed_actions, true ) && method_exists( __CLASS__, $action ) ) {\n \t\t\tself::$output_resp = self::$action( $input_data );\n \t\t}\n```\n\nThe 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.\n\nThe second change is a capability check inside `update_global_settings_fields`:\n\n```diff\n \tpublic static function update_global_settings_fields( $options ) {\n\n-\t\t$options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;\n \t\t$resp = array(\n \t\t\t'status' => false,\n \t\t\t'msg' => __( 'Changes saved', 'funnel-builder' ),\n \t\t);\n\n+\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n+\t\t\treturn $resp;\n+\t\t}\n+\n+\t\t$options = ( is_array( $options ) && count( $options ) > 0 ) ? wp_unslash( $options ) : 0;\n+\n \t\tif ( ! is_array( $options ) || count( $options ) === 0 ) {\n```\n\nThe 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.\n\nThe third change is the smaller one, and the loudest. The comment immediately following the patched dispatcher line gains a new suppression target:\n\n```diff\n-\t\t$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\n+\t\t$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\n```\n\n`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.\n\nThe 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.\n\n## This is [existence-is-authorization](/patterns/existence-is-authorization) at the method-dispatch layer.\n\nThe pattern across [n8n](/posts/n8n-chat-existence-was-the-gate), [ksmbd](/posts/ksmbd-durable-handle-was-the-credential), [PrestaShop](/posts/prestashop-cve-2025-51586-validator-was-on-the-object), [Divi Form Builder](/posts/divi-form-builder-cve-2026-5118-administrator-existed), and [OpenEMR](/posts/openemr-faxsms-cve-2026-24849-dispatcher-routes-by-method-name) 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.\n\nThe closest sibling is [FreePBX's Ajax dispatcher](/posts/freepbx-cve-2025-57819-class-exists-was-the-include), 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.\n\n## The install base is 40,000 stores. The in-wild payload is a card skimmer.\n\nSansec'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.\n\nThe 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.\n\nPoC: [rootdirective-sec/CVE-2026-47100-Analysis-Lab](https://github.com/rootdirective-sec/CVE-2026-47100-Analysis-Lab).","closing_line":"`method_exists` answered a question. The dispatcher treated the answer as authorization. Eighteen methods had names.","hook_md":"FunnelKit's checkout AJAX dispatcher takes the `action` field out of a JSON blob the attacker submits, then asks PHP whether that action is the name of a method on its own class. If `method_exists( __CLASS__, $action )` returns true, the dispatcher calls `self::$action( $input_data )` with attacker-controlled input.\n\nThe class has eighteen static methods. The five that the dispatcher was supposed to be calling are documented for the first time as a five-entry array in the patch.","post_id":591,"slug":"funnelkit-cve-2026-47100-method-exists-was-the-allowlist","title":"CVE-2026-47100: FunnelKit's Checkout Dispatcher Used method_exists() As Its Allowlist. Eighteen Methods Existed.","type":"initial","unreadable_sentence":"The fix is the allowlist, the in-method capability check, and the comment that silences the sniff that named the missing capability check."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCasFo1gAKCRDeZjl4jgkQ JscjAP9vAmRwBbhN6zQUGJhkVlwuZPWnAOVvhU4FHebU29nHugEA+TFj0ooblGOA jeSmo1IpTAD/DBkn0q9mfGoyX9qeugY= =b5Sp -----END PGP SIGNATURE-----