LW IT Solutions logo LW IT Solutions logo LW IT Solutions
« Blog Overview /WordPress Plugins & Tricks / WordPress 7.1.2: A Critical Security Fix for...
Read this article in other languages:

WordPress 7.1.2: A Critical Security Fix for Page Template Resolution

WordPress 7.1.2: A Critical Security Fix for Page Template Resolution

Management Summary

WordPress 7.1.2 fixed a critical flaw in the way page templates are loaded. Under certain conditions, an unauthenticated request could run code on the website’s server, even while the public pages appeared normal. The issue shows why maintenance matters beyond visible faults: a working website is not proof of protection. Updating to the current official release, with a restorable backup and confirmation that installation succeeded, addresses known fixes. The article concerns 7.1.2; a later security release has already followed.

Contents
  1. What the vulnerability allows
  2. What to check after updating
  3. What checksums reveal
  4. Questions and answers
  5. Sources

WordPress 7.1.2 was released on 22 September 2026 to fix a critical vulnerability in loading page templates. Under specific conditions, a request without signing in could cause code to run on the server. The update therefore mattered even for websites with an apparently normal homepage. [1]

Context as of 25 October 2026: This article covers the fix in 7.1.2. Version 7.1.3 followed on 6 October with further security fixes. A planned update should therefore target the current official version, not just the version discussed here. [5]

What the vulnerability allows

A theme controls the appearance of a WordPress site. When loading a page template, WordPress could include an existing PHP file outside the theme folders under the conditions described in the advisory. PHP code runs on the server. Loading the wrong file could therefore lead to code execution without a signed-in account. The advisory identifiers are CVE-2026-87902 and GHSA-7hp8-65ch-5whp. [2]

The described attack required several conditions together: a particular folder structure in the active theme and a suitable existing PHP file accessible to the web server. The advisory does not establish that every website was attacked. Conversely, a functioning homepage does not establish protection. In the 7.1 branch, versions 7.1.0 and 7.1.1 were affected; 7.1.2 contained the fix.

What to check after updating

Before updating, a backup of files and the database must support restoring the website. The official instructions cover updates through the administration area and manual file replacement. [3] Four checks follow:

  1. Record the actual installed version of each website, including test systems and rarely visited installations.
  2. Confirm successful installation of the current official version. An enabled update setting alone does not prove completion.
  3. Test the homepage, an ordinary page, a post, sign-in and an important form.
  4. Address errors and failed updates individually.

What checksums reveal

WP-CLI manages WordPress from the command line. The following commands run inside the directory of the intended WordPress installation. The first displays the installed version. The second compares WordPress core files with checksums published by WordPress.org. A checksum is a comparison value calculated from file contents. A mismatch means a checked file differs from the reference. [4]

Shell
wp core version
wp core verify-checksums --include-root

--include-root also reports unexpected files and folders in the root directory. An incorrect language or version selection can produce mismatches even for unchanged files; --locale and --version control those selections. The command downloads checksums from WordPress.org without changing the checked core files. Matching an old version does not make that version current.

This check does not investigate the whole database, user accounts or past attacks. Legitimate additional files can also trigger warnings. Before deletion, the file’s origin and purpose need establishing. A checksum match is not a comprehensive security assessment.

Questions and answers

Are enabled automatic updates enough?

No. WordPress has supported automatic minor and security updates since version 3.7. Whether an update actually runs depends on settings and server conditions. [6]

  • AUTOMATIC_UPDATER_DISABLED, WP_AUTO_UPDATE_CORE and plugin filters can disable or limit automatic updates. The configured value matters.
  • Detected version control such as Git or Subversion blocks automatic updates by default. WordPress checks for corresponding folders above the installation too. A filter can change this decision. [7]
  • The updater needs file access without an interactive request for credentials. Server requirements, such as a suitable PHP version, must also be met. [11]
  • WP-Cron runs scheduled WordPress tasks. With DISABLE_WP_CRON=true, ordinary page requests no longer trigger this work. An external call to wp-cron.php or another configured way of running cron events can still start the tasks. Without a working trigger, due tasks remain pending. [10]

WordPress can send an email after an automatic core update. Filters can disable sending, and a sent message may never reach a monitored inbox. The locally checked version number and update log therefore matter more than an expected email. [8]

What does the fix mean for older versions?

WordPress also adapted this fix for older branches back to 4.7. For example, the 4.7 branch received the patched version 4.7.37. Adapting an individual fix for an older program version is called a backport. That does not promise future fixes for every defect in the old version. WordPress states that only the latest version is actively supported. A backport therefore does not replace planning a full upgrade. [1][2]

Can plugins be checked in the same way?

wp plugin verify-checksums --all compares plugin files against available WordPress.org checksums. Custom plugins and plugins distributed elsewhere often lack reference data there. Checksums can also be unavailable for a particular version of a directory plugin. Such warnings leave a check unresolved; no integrity result has been established. [9]

The command does not check themes. Without suitable checksums, files can be compared against a trusted original package of the same version. Even a match only describes those files, not the security of the entire website.

Lukas Wojcik

Lukas Wojcik

Systems architect and technology enthusiast specializing in scalable tracking solutions, GMP Stack (GA4 & GTM), and robust backend architectures. Advocate for clean code and privacy-first design.

Get in touch

A question or an idea for a web project? Tell me a little about it. This form uses reCAPTCHA to protect against spam.

Write a comment

Experience with other plugins or hosting environments and questions about the setup are welcome here.

The email address is not published. Required fields are marked with an asterisk.