-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The filter runs on the frontend, only when nobody is in `wp-admin`\n\nThe hook registration is in the same file, line 78, inside the `__construct` of `UAGB_Init_Blocks`:\n\n```php\nif ( ! is_admin() ) {\n add_action( 'render_block', array( $this, 'render_block' ), 5, 2 );\n add_filter( 'render_block', array( $this, 'add_gbs_class' ), 10, 2 );\n}\n```\n\n`render_block` is WordPress's filter for every block on every rendered post. Spectra hooks it at priority 5, before any other filter on that name. The `! is_admin()` branch means the filter runs on the frontend only: public page loads, post previews, draft views by their authors. Not the editor. The editor never reaches this code.\n\nThe handler itself is short enough to quote in full:\n\n```php\npublic function render_block( $block_content, $block ) {\n // Register only UAG blocks.\n if ( ! empty( $block['blockName'] ) && strpos( $block['blockName'], 'uagb/' ) !== false ) {\n // Register block on server-side to support WP Hide blocks feature introduce in WP 6.9.\n $registry = WP_Block_Type_Registry::get_instance();\n // Only register if the block is NOT already registered.\n if ( ! $registry->is_registered( $block['blockName'] ) ) {\n $registry->register( $block['blockName'], $block['attrs'] );\n }\n }\n // ... display conditions, animations, etc.\n}\n```\n\nThe check that gates registration is `strpos( $block['blockName'], 'uagb/' ) !== false`. The block name does not have to correspond to a block Spectra actually ships. `uagb/cve-2026-7465`, `uagb/rce`, `uagb/anything-the-author-types` all pass the gate. The prefix is the only test.\n\n## `$block['attrs']` is the post body, parsed\n\nWordPress's block grammar is HTML comments around JSON. A post that contains\n\n```\n\n```\n\nis parsed by `parse_blocks()` into an array element shaped like\n\n```php\n[\n 'blockName' => 'uagb/rce',\n 'attrs' => [ 'render_callback' => 'wp_insert_user' ],\n 'innerHTML' => '',\n // ...\n]\n```\n\nThe value of `$block['attrs']` is the JSON object inside the comment, decoded straight to a PHP array. There is no schema applied at parse time. There is no allowlist of keys. WordPress preserves whatever the author typed and hands the array to every filter on `render_block`. Whoever wrote the post wrote `$block['attrs']`.\n\nWordPress's Contributor role can call `wp_insert_post` to create draft posts whose `post_content` is whatever string the contributor sends. The REST API endpoint `/wp-json/wp/v2/posts` with `status: \"draft\"` accepts the request from a Contributor session, and the `?p=` route on the frontend renders the draft when the author's session loads it. The PoC uses exactly that path.\n\n## `WP_Block_Type_Registry::register` reads `render_callback` as a PHP callable\n\nWordPress core's `WP_Block_Type_Registry::register( $name, $args = array() )` constructs a `WP_Block_Type` from `$args` via `set_props`, which assigns properties whose names are in a fixed list. `render_callback` is one of those properties. `script_handles`, `style_handles`, `view_script_handles`, `variation_callback` are others. `WP_Block_Type::is_dynamic()` returns `is_callable( $this->render_callback )`. `WP_Block::render()` does, in WordPress 6.x:\n\n```php\n$block_content = (string) call_user_func(\n $this->block_type->render_callback,\n $this->attributes,\n $block_content,\n $this\n);\n```\n\nThe function name in `render_callback` is a string. `is_callable( \"wp_insert_user\" )` returns true because `wp_insert_user` is a defined function in WordPress's userland. The `call_user_func` passes the next block's `$this->attributes` as the first argument. PHP userland functions silently ignore extra positional arguments past their declared parameters; on PHP 8 this emits a deprecation notice and continues. `wp_insert_user` takes one argument, an associative array of user fields, including `role`.\n\n## The two-block payload names a block that does not exist\n\nThe PoC's payload is the smallest object the exploit reduces to:\n\n```html\n\n\n```\n\nWhen the post is rendered, WordPress's block loop calls `render_block` on each block in order. The first invocation:\n\n1. Block name starts with `uagb/`. Pass.\n2. `WP_Block_Type_Registry::get_instance()`.\n3. `is_registered( 'uagb/cve-2026-7465' )` returns false; the block name is invented.\n4. `$registry->register( 'uagb/cve-2026-7465', [ 'render_callback' => 'wp_insert_user' ] )`. `WP_Block_Type` is constructed, the `render_callback` property is set to the string `\"wp_insert_user\"`, and `is_dynamic()` now returns true.\n\nThe first block's static HTML output is the empty string, which is what `` renders to. Nothing visible happened. The registry mutated.\n\nThe second invocation, on the same `uagb/cve-2026-7465`:\n\n1. WordPress's block render path sees the block is now registered.\n2. `WP_Block::render()` calls `call_user_func( \"wp_insert_user\", $attributes, $block_content, $this )`.\n3. `wp_insert_user` reads its single declared parameter as the user-data array. `user_login`, `user_pass`, `role`, `user_email` are all present. The function constructs the user, assigns the role, returns the new user ID.\n\nA Contributor's draft, opened on the frontend by the author's session, has now created a WordPress administrator account whose credentials the author chose. The author logs out, logs in as the new administrator, and walks the standard WordPress administrator-to-RCE path through `wp-admin/theme-editor.php` or the plugin-upload form.\n\nThe block type that the PoC weaponizes does not exist in Spectra. Spectra creates it on the post's behalf because the only test the filter runs is the `uagb/` prefix.\n\n## The patch is the smallest possible content-is-command fix\n\nThe diff for 2.19.26, on the same file and the same line:\n\n```diff\n if ( ! $registry->is_registered( $block['blockName'] ) ) {\n- $registry->register( $block['blockName'], $block['attrs'] );\n+ $registry->register( $block['blockName'], array() );\n }\n```\n\nThere is no allowlist of safe keys. There is no `unset( $safe_attrs['render_callback'] )`. The patch does not enumerate `script_handles`, `view_script_handles`, `style_handles`, `variation_callback`, the other `WP_Block_Type` fields the PoC could have reached for. The fix gives the registry the empty array, and the comment above the call still reads `// Register block on server-side to support WP Hide blocks feature introduce in WP 6.9`. The WP Hide feature, whatever its requirements were, did not actually need any of the attrs the prior code was forwarding. The forwarding was vestigial from the day it was written.\n\nThis is content-is-command at the boundary between WordPress's block grammar and `WP_Block_Type`. The content channel is the post body's block-comment JSON, written by whoever has `edit_posts`. The interpreter is `WP_Block_Type_Registry::register`, which reads `render_callback` as a `call_user_func` target. The bridge is a single argument to one function call. The bridge code does not validate, sanitize, or filter; it forwards the entire inbound structure into the outbound call, which is the [Wide Default, Narrow Doc shape](/patterns/wide-default-narrow-doc): `WP_Block_Type_Registry::register` accepts whatever `WP_Block_Type` accepts, and `WP_Block_Type` accepts a PHP callable as one of its properties, and the operator reasoning from Spectra's UAG-specific docs would not know which.\n\n## The Contributor role is the boundary that was crossed\n\nWordPress's role model has three writer tiers below Editor. The lowest is Subscriber, who has no posting capability at all. Above that is Contributor, who has `edit_posts` and `delete_posts` and nothing else. Specifically, no `publish_posts`, no `upload_files`, no `edit_others_posts`. The next tier is Author, who can publish their own work and upload media. The Contributor role exists because the WordPress core team understood that \"let strangers write drafts\" is a frequent operational need and that letting them publish, upload, or edit other people's work is a separate decision. The role's capability list is the contract.\n\nThe capability `edit_posts` exists so a multi-author blog with student writers, a news site with stringers, a publication with guest contributors, a university with adjunct posters can let those people produce text without trusting them with any state-changing primitive the site relies on. CVE-2026-7465 turns `edit_posts` into `wp_insert_user(..., 'administrator')` via the act of typing a draft and previewing it. Spectra is installed on a million-plus WordPress sites. Brainstorm Force's changelog for 2.19.26 reads, in full: \"This update addressed a security bug. Props to Wordfence for reporting it responsibly to our team. Please make sure you are using the latest version on your website.\" No mention of the class. No mention that the precondition is the Contributor role the operator may have given to a freelancer. No mention that the trigger is the frontend rendering path that runs every time anyone views a post.\n\nThe Spectra changelog over the last seven months names five security releases: 2.19.15 (Oct 2025), 2.19.18 (Jan 2026), 2.19.21 (Mar 2026), 2.19.23 (Apr 2026), 2.19.26 (May 2026). Each one is one sentence with the same shape. The pattern, where Brainstorm Force is concerned, is the shape of the changelog entry. The pattern the patches close is content-is-command at the boundary between WordPress's post body and a PHP interpreter the plugin author placed near it.\n\nPoC: [endangcamon/CVE-2026-7465-POC](https://github.com/endangcamon/CVE-2026-7465-POC)","closing_line":"The Contributor role exists so site owners can let strangers write drafts. Spectra made the drafts the code that ran when the drafts were viewed.","hook_md":"Spectra ships a frontend filter at `classes/class-uagb-init-blocks.php:335` whose body is one line. Before the May 4 patch, the line was `$registry->register( $block['blockName'], $block['attrs'] )`. After the patch, it reads `$registry->register( $block['blockName'], array() )`. The fix does not validate `$block['attrs']`. It does not enumerate the dangerous fields. It throws the data away.\n\nWhat `$block['attrs']` was, in that call, is the JSON between the braces of ``, written into the post body by whoever wrote the post. WordPress's Contributor role exists so site owners can let strangers write drafts without granting `publish_posts`, `edit_others_posts`, or `upload_files`. CVE-2026-7465 is what happens when a plugin on 1+ million WordPress sites lets the JSON inside a Contributor's draft pick the PHP function the frontend renderer is about to call.","post_id":528,"slug":"spectra-cve-2026-7465-fix-is-empty-array","title":"CVE-2026-7465: Spectra's Contributor-RCE Patch Is array(). That Is What block-attrs Was Always Supposed To Be.","type":"initial","unreadable_sentence":"The patch does not validate `$block['attrs']`. It does not enumerate the dangerous fields. It replaces the data with `array()`, which is what the second argument to `register()` was always supposed to be."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCapMybQAKCRDeZjl4jgkQ JhdSAP96bMjKHwtPsiPeFznyEUUDjYXcuUbV312gEQVKghb7DwEA75zXxW8MJHPS IUf2vaobUjegyMhuRhY5M1DKqJR8DAc= =8wOA -----END PGP SIGNATURE-----