Skip to content
Witen field notes

WordPress 7.1.5 fixes a way to hijack your block editor

· Witen Labs · Security advisory

Updated : Witen Blocker 0.6.57 is out with protection for three of these flaws.

What happened

WordPress 7.1.5 came out on November 18, 2026 with twenty security fixes. Five work without an account on your site. The worst of those doesn’t attack your server at all: it turns the block editor against whoever opens it, and an administrator’s browser can do anything an administrator can.

  • Who is affected: every WordPress site older than the fixed release on its branch.
  • The headline flaw: WordPress calls it “unauthenticated privilege escalation via Template Part block attributes,” with possible remote code execution. How it works is below.
  • Four more need no account: a stored script attack through shortcodes in comments, one request that makes your site fetch any number of pages, a leak of private category and tag names, and a script attack through the old media popup.
  • Not every branch has its fix yet. 7.1, 7.0, 6.9, 6.8, 6.7, and 6.6 do. 6.5 and older are still waiting. Check your version.

How the editor attack works

A Template Part block pulls a shared piece of a theme, such as the header, into a page. Its markup names the part by theme and slug:

<!-- wp:template-part {"slug":"header","theme":"twentytwentyfive"} /-->

When you open a page in the block editor, the editor asks your site for that part over the REST API, at an address built from those two names: /wp/v2/template-parts/twentytwentyfive//header. Before 7.1.5 it used the names as they came. A slug like ../../users walks that address out of template-parts and onto another endpoint, and the request goes out from your browser, signed in as you, with your security token attached.

To your server, that request looks exactly like you clicking a button. No firewall rule can tell the difference, because there is nothing wrong with the request: it is the wrong request, sent on your behalf. WordPress rates the flaw as privilege escalation with possible code execution, so the steered requests can change things, not only read them, and an administrator’s session can create users and install plugins.

The fix is in the editor’s own code (the WordPress code change): 7.1.5 refuses any name containing .., ?, #, &, a backslash, an encoded slash, or a control character before it builds an address. WordPress hasn’t said how an attacker with no account gets the block onto your site in the first place, and we won’t guess. The safe assumption is that they can.

Step 1: Check your version

In your dashboard, go to Dashboard → Updates. It shows the version you run and whether a newer one is available.

WordPress releases that contain the 7.1.5 security fixes
Your branchFixed in
7.17.1.5
7.07.0.9
6.96.9.12
6.86.8.13
6.76.7.12
6.66.6.12
6.5 and olderNot yet released

On 6.5 or older? WordPress says the remaining backports will ship as they’re ready. Until yours does, the fastest way to the fix is to move up to 6.6 or later. If you can’t, follow Step 2 to the letter.

Step 2: Update, and keep editors out until you do

Update from Dashboard → Updates, or with WP-CLI:

wp core update --minor

If you can’t update today:

  • Keep people out of the block editor and the Site Editor. The front of your site doesn’t load the editor’s code; the attack fires only when someone signed in opens the editor. Draft somewhere else for a day.
  • Turn off pingbacks entirely with a must-use plugin. Save this as wp-content/mu-plugins/no-pingbacks.php:
<?php
add_filter( 'xmlrpc_methods', function ( $methods ) {
    unset( $methods['pingback.ping'] );
    return $methods;
} );
  • Hold new comments for moderation under Settings → Discussion, and don’t approve anything with a shortcode in it, the text in square brackets, until you’ve updated.

Step 3: Check your content

Template Part blocks belong in templates and template parts. They have no business in a comment, and they’re rare in posts. List every place they appear outside those two:

wp db query "SELECT ID, post_type, post_status FROM $(wp db prefix)posts WHERE post_content LIKE '%wp:template-part%' AND post_type NOT IN ('wp_template', 'wp_template_part', 'revision')"
wp db query "SELECT comment_ID, comment_approved FROM $(wp db prefix)comments WHERE comment_content LIKE '%wp:template-part%'"

Open anything that turns up in the code editor, not the visual one, and look at the slug and theme values. Ordinary names are words joined by hyphens. Any .., ?, #, &, backslash, or %2f is an attack: delete the block, then look under Users → All Users for administrators you didn’t create.

The four other flaws that need no account

  • Shortcode script in comments. WordPress checks a comment for unsafe HTML when it arrives. Before 7.1.5, it then decoded escape codes like \x3c inside a shortcode, turning them into a real < after the check had passed. A visitor could plant a script in a comment.
  • Pingback floods. One XML-RPC request could carry any number of pingbacks, and your site fetched every linked page and did database work for each. 7.1.5 processes one per request.
  • Private category and tag names. The REST API’s search could list terms from taxonomies a site meant to keep private, to anyone.
  • The old media popup. A crafted link could run script in the browser of a signed-in user who clicked it.

What Witen Blocker does about it

Witen Blocker 0.6.57 is out now, with three protections for sites that haven’t updated WordPress yet. Update it from Plugins in your dashboard.

  • Template Part blocks with a steering name are refused. Any comment or post save that carries one gets a 403 and is never stored, and the attempt shows up in your activity log. Ordinary template parts, including names in any language, are untouched.
  • Comments that hide HTML in a shortcode go to the Spam folder, where you can restore one if it was real. The activity log says why.
  • One pingback per XML-RPC request, the same limit 7.1.5 sets. Jetpack, the mobile apps, and ordinary pingbacks keep working.

It doesn’t replace the update. The other seventeen fixes live in WordPress’s own code, and only the update closes them.

What we saw on our sensors

We searched the last 30 days of requests from the WordPress sites and servers that report to Witen. Nothing reached for the private-term search or the old media popup, and nothing unusual touched template parts, though a steered editor request would look normal by design. XML-RPC traffic ran at its usual steady trickle. Access logs don’t record request bodies, so we can’t tell from them whether any of it carried batched pingbacks.

That was before the release. Attackers read the same code changes we did, and the editor fix is short and easy to follow. Update this week.

The other fifteen fixes

Thirteen need an account on your site, or a signed-in user to fall for something, and two are hardening. They matter most on sites with several authors, or where an account could be stolen:

  • Privilege escalation: on multisite, a site administrator could take over a super admin account through Customizer menu previews.
  • SQL injection: through nested relation values in meta queries, and through the front page setting in Customizer previews.
  • Stored cross-site scripting (script that runs in someone else’s browser): Customizer previews; the Comment Date block’s date format; oEmbed provider responses; Openverse image details in the block editor; media file names when a media block becomes a File block; and the Interactivity API’s store names.
  • Information leaks: commenters’ email addresses through the REST API comments endpoint, author details through post and template author assignment, and comments on private posts through XML-RPC.
  • Authorization: authors could edit comments they shouldn’t in the admin.
  • Hardening: a looser-than-intended JSON media type check, and the Imgur embed, whose provider is gone.

7.1.5 also removes 1024-bit root certificates from older branches, as 7.0 already did. WordPress 7.2, due December 8, has all of these fixes in its second release candidate.

Sources

Share this post