The filter runs on the frontend, only when nobody is in wp-admin
The hook registration is in the same file, line 78, inside the __construct of UAGB_Init_Blocks:
if ( ! is_admin() ) {
add_action( 'render_block', array( $this, 'render_block' ), 5, 2 );
add_filter( 'render_block', array( $this, 'add_gbs_class' ), 10, 2 );
}
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.
The handler itself is short enough to quote in full:
public function render_block( $block_content, $block ) {
// Register only UAG blocks.
if ( ! empty( $block['blockName'] ) && strpos( $block['blockName'], 'uagb/' ) !== false ) {
// Register block on server-side to support WP Hide blocks feature introduce in WP 6.9.
$registry = WP_Block_Type_Registry::get_instance();
// Only register if the block is NOT already registered.
if ( ! $registry->is_registered( $block['blockName'] ) ) {
$registry->register( $block['blockName'], $block['attrs'] );
}
}
// ... display conditions, animations, etc.
}
The 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.
$block['attrs'] is the post body, parsed
WordPress's block grammar is HTML comments around JSON. A post that contains
<!-- wp:uagb/rce {"render_callback":"wp_insert_user"} /-->
is parsed by parse_blocks() into an array element shaped like
[
'blockName' => 'uagb/rce',
'attrs' => [ 'render_callback' => 'wp_insert_user' ],
'innerHTML' => '',
// ...
]
The 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'].
WordPress'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=<id> route on the frontend renders the draft when the author's session loads it. The PoC uses exactly that path.
WP_Block_Type_Registry::register reads render_callback as a PHP callable
WordPress 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:
$block_content = (string) call_user_func(
$this->block_type->render_callback,
$this->attributes,
$block_content,
$this
);
The 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.
The two-block payload names a block that does not exist
The PoC's payload is the smallest object the exploit reduces to:
<!-- wp:uagb/cve-2026-7465 {"render_callback":"wp_insert_user"} /-->
<!-- wp:uagb/cve-2026-7465 {"user_login":"blackbox_rce_admin","user_pass":"Bl4ckb0x_RCE@2026!","role":"administrator","user_email":"[email protected]"} /-->
When the post is rendered, WordPress's block loop calls render_block on each block in order. The first invocation:
- Block name starts with
uagb/. Pass.
WP_Block_Type_Registry::get_instance().
is_registered( 'uagb/cve-2026-7465' ) returns false; the block name is invented.
$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.
The first block's static HTML output is the empty string, which is what <!-- wp:foo /--> renders to. Nothing visible happened. The registry mutated.
The second invocation, on the same uagb/cve-2026-7465:
- WordPress's block render path sees the block is now registered.
WP_Block::render() calls call_user_func( "wp_insert_user", $attributes, $block_content, $this ).
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.
A 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.
The 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.
The patch is the smallest possible content-is-command fix
The diff for 2.19.26, on the same file and the same line:
if ( ! $registry->is_registered( $block['blockName'] ) ) {
- $registry->register( $block['blockName'], $block['attrs'] );
+ $registry->register( $block['blockName'], array() );
}
There 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.
This 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: 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.
The Contributor role is the boundary that was crossed
WordPress'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.
The 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.
The 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.
PoC: endangcamon/CVE-2026-7465-POC
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.