WordPress 7.1.5: Lock Down Your Headless CMS API
WordPress 7.1.5 shipped on November 18, 2026. It’s a security release, and WordPress recommends updating immediately. The release notes list 20 security items: 19 have their own advisory in the WordPress security repository, and one is a hardening change (removing the block editor’s Imgur embed variation).
Most of them are XSS issues in the editor and Customizer. For a headless site, the interesting part is different: several fixes touch the REST API and XML-RPC, which on a headless install are often public, rarely watched and more open than the frontend needs.
1. What 7.1.5 fixed, grouped for headless sites
Severity below is WordPress’s own rating from its advisories. At the time of writing the advisories list no CVE IDs.
REST API
- Private taxonomy terms exposed to anonymous visitors (Medium, GHSA-rcr3-43fx-wqfv). Combining the term search type with a post subtype in the REST search endpoint returned terms from every taxonomy, including private ones such as navigation menus. No login needed. Fixed back to 5.6.
- User email addresses via the comments endpoint (Low, GHSA-jq8m-j7jq-c53m). An Author or above could make an existing user the author of a comment on their own post and so see that user’s email. On multisite, a site Administrator could do this for any user on the network. This needs an account, not anonymous access.
- Author data via post and template author assignment (Low, GHSA-v7qc-72mg-wgpc). Multisite only: a user who could change a post’s or template’s author through the REST API could assign it to someone who isn’t a member of the site, exposing that user’s details to the site’s editors.
XML-RPC
- Unauthenticated DoS via batched pingbacks (Medium, GHSA-56j2-5mp6-wr3x). A single request could bundle many pingbacks through
system.multicall. Each one paused for a second and made an outbound HTTP request, so one request could tie up a PHP worker for a long time. wp.getCommentsinformation disclosure (Medium, GHSA-p9x8-m3q4-9wg6). The method returned approved comments without checking whether the user could read each one. Any logged-in user, even a Subscriber, could read commenters’ emails and IP addresses and comments on private posts, including the post title.
Template Part: privilege escalation to RCE
GHSA-pmp8-6cv8-q323 (High). The release notes call it an unauthenticated privilege escalation that could lead to RCE. The advisory gives the mechanism, and it’s worth reading precisely:
- a Template Part block’s
themeandslugattributes could make an Administrator’s editor send requests to another URL on the same site; - an Author or above could set those attributes in a post, or an unauthenticated attacker could send an Administrator a crafted editor link (or redirect them to one);
- when the Administrator opened it, this could create an Administrator account for the attacker, and from there run code through plugin upload.
So “unauthenticated” here means the attacker needs no account, but an Administrator still has to open the link. Fixed back to 5.9.
Also worth knowing
- Unauthenticated stored XSS via shortcode attributes in comments (High, GHSA-cr2m-2j4r-3v3x). It triggers where a Comments or Latest Comments block is placed in post content. If your frontend renders post HTML from the API as is, check whether you use those blocks.
- Multisite Super Admin takeover via Customizer menu previews (High, GHSA-mwj7-xhp9-7773). A site Administrator could take over a Super Admin account. Requires a classic theme with widgets enabled.
- Two SQL injections (
WP_Meta_Querynested relations; the front page setting in Customizer changeset previews), seven more XSS fixes, an Author+ authorization bypass in admin comment editing, and a hardening fix for JSON media type matching. The full list is in the release post.
2. Why headless installs are especially exposed
None of these bugs is specific to headless WordPress. But the way headless CMS installs are often run can make them harder to notice and slower to patch:
- The origin is public. The frontend lives on
example.com, and the CMS sits oncms.example.comwith the full REST API, XML-RPC,wp-login.phpandwp-adminopen to the internet, even though the frontend only reads a handful of routes. - Updates are an afterthought. The site looks fine because the frontend is fine. If background updates are turned off, or failed months ago, nobody notices.
- Nobody visits the admin. That cuts both ways: fewer chances for a phishing link like the Template Part one to land, but also nobody who would notice a new administrator account, odd comments or a plugin they didn’t install.
3. Update and verify
WordPress 7.1.5 is the current release. The advisories list backports for older branches, and WordPress’s own version-check API already marks these as released and 7.1.4 as insecure: 7.0.9, 6.9.12, 6.8.13 and so on down to 4.7.40. The release post says backports “will ship as they become ready”, so check your branch rather than assuming. Note also that not every fix reaches every branch: the Template Part fix goes back to 5.9, and the taxonomy fix to 5.6. If you’re on an old branch, plan to move to 7.1.
wp core version
wp core update
wp core version
# What WordPress itself says about your version: latest / outdated / insecure
curl -s https://api.wordpress.org/core/stable-check/1.0/ | jq -r '."7.1.4", ."7.1.5"'
Auto-update policy. Check that nothing in wp-config.php turns minor updates off:
wp config get WP_AUTO_UPDATE_CORE 2>/dev/null
wp config get AUTOMATIC_UPDATER_DISABLED 2>/dev/null
No output means the constant isn’t set. Automatic background updates for minor releases are WordPress’s default; if you’ve disabled them on purpose (for example because deploys go through git), make sure your deploy process actually picks up security releases the same day.
Multisite. Core is updated once for the whole network, but three of the fixes above (comment emails, author assignment, Super Admin takeover) are specifically about multisite, so a network is a priority. After updating, run wp core update-db --network if WordPress asks for a database update, and check every node, staging copy and replica, not just the one you deployed to.
4. Lock down the API
The principle: anonymous visitors get exactly the routes and methods the frontend uses, and nothing else. Updating fixes these specific bugs; reducing the surface limits what the next bug can reach.
Note: the snippets in this section are my own examples, not from the advisories, and haven’t been tested against your setup. Adapt the route list to your frontend and test on staging first.
4.1. Allowlist REST routes for anonymous requests (mu-plugin)
Save as wp-content/mu-plugins/headless-api-hardening.php:
<?php
/**
* Plugin Name: Headless API hardening
* Description: Anonymous REST access limited to the routes the frontend reads.
*/
add_filter('rest_pre_dispatch', function ($result, $server, $request) {
if (is_user_logged_in()) {
return $result; // editors, application passwords, etc.
}
$route = $request->get_route();
$method = $request->get_method();
// Adjust to what your frontend actually requests.
$allowed = [
'#^/wp/v2/(posts|pages|categories|tags|media)(/\d+)?$#',
];
if ($method === 'GET') {
foreach ($allowed as $pattern) {
if (preg_match($pattern, $route)) {
return $result;
}
}
}
return new WP_Error('rest_forbidden', 'Not available.', ['status' => 401]);
}, 10, 3);
This also closes anonymous access to /wp/v2/users, /wp/v2/comments and /wp/v2/search. If your frontend shows or accepts comments, add those routes back deliberately and decide which methods they need. If the frontend uses WPGraphQL instead of REST, apply the same thinking there: WPGraphQL has its own settings for public introspection and what anonymous queries can see.
4.2. Turn off XML-RPC
A headless frontend almost never needs XML-RPC. Note that the xmlrpc_enabled filter only covers methods that require authentication; to remove everything, including pingbacks, empty the method list:
// in the same mu-plugin
add_filter('xmlrpc_methods', '__return_empty_array');
add_filter('wp_headers', function ($headers) {
unset($headers['X-Pingback']);
return $headers;
});
Better still, block it before PHP runs (nginx):
location = /xmlrpc.php {
deny all;
}
Check first that nothing you use depends on it (some mobile apps and older publishing tools do).
4.3. Restrict the admin and the origin (nginx)
If editors work from known IPs or a VPN:
location ~ ^/(wp-admin/|wp-login\.php) {
allow 203.0.113.10; # office / VPN, example address
deny all;
# keep your usual PHP handling here, e.g.:
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
wp-admin/ contains PHP, so this location has to pass PHP to FPM itself, otherwise the files are served as text or 404. If a plugin calls admin-ajax.php from the public site, carve it out explicitly.
If the frontend only fetches from the CMS on the server side (SSG/SSR), you can go further and allow only the frontend’s servers to reach /wp-json/ or /graphql. Leave /wp-content/uploads/ public unless your images are proxied through the frontend.
5. Self-audit: what does your API show to strangers?
Run these from a machine that isn’t logged in. Replace cms.example.com. These are read-only requests, but only run them against sites you own.
CMS=https://cms.example.com
# Core version (should be 7.1.5 or your branch's backport)
curl -s "$CMS/feed/" | grep -o '<generator>[^<]*'
# How many REST routes are public?
curl -s "$CMS/wp-json/" | jq '.routes | keys | length'
# User list: names and slugs are login hints
curl -s "$CMS/wp-json/wp/v2/users" | jq '.[]? | {id, name, slug}'
# Term search: should not return anything you consider private
curl -s "$CMS/wp-json/wp/v2/search?type=term&search=a" | jq '.[]? | {id, title, type, subtype}'
# Comments: which fields come back anonymously?
curl -s "$CMS/wp-json/wp/v2/comments?per_page=1" | jq '.[0] | keys?'
# XML-RPC: expect 403, or at least no method list
curl -s -o /dev/null -w "%{http_code}\n" -X POST "$CMS/xmlrpc.php" \
-d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>'
# Admin and login: expect 403 from outside your allowlist
curl -s -o /dev/null -w "%{http_code}\n" "$CMS/wp-login.php"
# Headers that advertise endpoints
curl -sI "$CMS/" | grep -iE '^(x-pingback|link):'
If the feed doesn’t show a generator line, check wp core version on the server instead. A good result: a short route list, 401 on users, comments and search, 403 on XML-RPC and the login page, and no X-Pingback header.
6. Want a second pair of eyes?
If you run a headless WordPress site and aren’t sure what its CMS exposes, I offer a free “first look”: a quick review that highlights weak points such as an open API, an old core branch or a public admin. It’s not a full audit, but it usually shows where to start. Get in touch, and I’ll reply within one working day.
Sources:
- WordPress 7.1.5 Release — https://wordpress.org/news/2026/11/wordpress-7-1-5-release/
- WordPress security advisories (wordpress-develop) — https://github.com/WordPress/wordpress-develop/security/advisories
- GHSA-rcr3-43fx-wqfv, GHSA-jq8m-j7jq-c53m, GHSA-v7qc-72mg-wgpc, GHSA-56j2-5mp6-wr3x, GHSA-p9x8-m3q4-9wg6, GHSA-pmp8-6cv8-q323, GHSA-cr2m-2j4r-3v3x, GHSA-mwj7-xhp9-7773
- WordPress version-check API — https://api.wordpress.org/core/stable-check/1.0/
- Technobezz coverage — https://www.technobezz.com/news/wordpress-715-fixes-security-flaws-account-takeovers