WordPress: Upgrade failure allows you to run code before the CVE-2026-119977 patch

Author: Published 6 min de lectura 24 reading

The images in this article were generated with artificial intelligence. How we publish

A bug in the WordPress update mechanism allows sites to become vulnerable during the same process that installs the patch: although WordPress already published corrections, the code that makes the update can create a temporary copy of the installer in a folder accessible by the web and that copy is generated with the old code. If an attacker discovers the name of that folder and accesses the installer before WordPress erases it, you can run code on the server. Vulnerability is registered as CVE-2026-119977 and affects versions from 4.7 to 7.1.3; WordPress published the correction in 7.1.4 and in maintenance versions for previous branches.

Confirmed facts: WordPress adds during updates a copy of the package downloaded in wp-content / upgrade to decompress and run the installer; the released patch changes the name of that temporary folder to a random one. However, the update process itself uses the old code to uncompress the update in that folder, so that the name generation (and the inclusion of the installer files) can be predictable at the moment of deployment. The U.S. Agency CISA added vulnerability to its catalogue of exploited failures ( CISA Known Exploited Vulnerabilities), and Wordfence recorded attack attempts minutes after the correction was published, in a pattern that matches looking for that short moment when the time folder is accessible.

WordPress: Upgrade failure allows you to run code before the CVE-2026-119977 patch
Image generated with IA.

How it works technically (summary): when WordPress applies a full update, decompress a package that includes the installer files in wp-content / upgrade / NAME _ TEMP. Before the patch, that NAME _ TEMP could be predicted (in versions 5.9 + derived from the name of the downloaded file; in other versions random characters were added, but the name could be filtered by errors). An unaccounted attacker that determines that name can use the exposed installer to create a wp-config.php controlled by the attacker within the temporary copy. If the update overwrites files with the contents of the temporary copy, the attacker gets control or can run PHP with the web server permissions.

Some points of accuracy and real risk: in laboratories the vulnerable "window" usually lasts seconds; Wordfence and the researcher report active attempts that last hours looking for sites that update in that period. Not all updates expose the installer: partial updates (which contain only changed files between versions) do not always include the installer files; in addition, WordPress will fall into a full package if the core checkups differ or if the operation is a reinstallation. Therefore, the practical possibility of operation depends on which package you receive a site and the update code installed on that server.

Those affected: WordPress sites between 4.7 and 7.1.3 that have not yet installed the correction. The sites with active automatic updates follow the same process and can be exposed at that short point; the sites in 4.6 and above do not receive patches and remain without official solution, so they must migrate to supported versions. Once the site installs version 7.1.4 or the update of its branch, the following updates use random names for the time folder and the vector described above is no longer available.

Practical consequences: an attacker who can exploit the window can run code with the web server permissions, read and write files from the active site, add false management users, install back doors or change database settings. Wordfence observed activity consistent with attacks looking for that update moment; the associated CVSS score (according to public record) is high.

Concrete and verifiable measures to be taken by the responsible for a WordPress site right now:

1) Block web access to wp-content / upgrade. This does not break the update process because WordPress operates directly over disk files. On the server, restrict requests to that route from the web server configuration: for example, in Nginx you can addlocation ^ ~ / wp-content / upgrade / {deny all;}; in Apache, include a block< Directory / route / to / site / wp-content / upgrade > Request all denied < / Directory >in the virtual host configuration. If you only have html access, place in the WordPress root a rule likeRedirectMatch 403 ^ / wp-content / upgrade /before the rewriting rules. After applying the lock, confirm that a request to / wp-content / upgrade / returns 403.

2) Update to the parcheed version as soon as possible. Install 7.1.4 or the update corresponding to your branch; if the site already started an automatic update, keep the temporary folder lock reduces the risk during that process. See the official WordPress security channel for the latest version: https: / / wordpress.org / news / category / security /.

3) If you cannot block the folder, make the manual update out of the webroot. Proceed this way: make full backup of files and database; decompress the new version into a folder that the web server does not serve; copy the files from the new core to the site without touching wp-config.php or wp-content; run the database update from the administrator. This route avoids creating an accessible installer in wp-content / upgrade. Note: WP-CLI does not avoid risk because it uses the same update and the same temporary directory (more information in the official documentation of WP-CLI: https: / / wp-cli.org /).

WordPress: Upgrade failure allows you to run code before the CVE-2026-119977 patch
Image generated with IA.

4) Inspect engagement signals if you did not park immediately. Look for unexpected requests to PHP files under wp-content / upgrade, PHP files in that folder you have not placed, new administrative accounts or unknown plugins. Wordfence has published detection recommendations and signs of attack that can be used as an initial checklist ( Wordfence Blog for follow-up and rules). If you detect signs of intrusion, restore from reliable copies and consider forensic analysis.

Information still uncertain or context dependent: although there is public evidence of exploitative attempts and code tools that point to this failure have appeared in repositories, there is no public and complete list of sites confirmed as committed by this vector or official details on specific campaigns by CISA. The effectiveness of public exploits available in GitHub is not widely verified; its operation may depend on whether the package was complete or partial and on the actuator present on the server.

In short, the risk is not only the original failure but the way the update mechanism itself leaves a small exposure window. The simplest and most effective immediate mitigation is to block web access to wp-content / upgrade and then apply the official patch. For equipment with many sites, automate the verification of the lock and installation of the parking version, and prioritize the migration of obsolete facilities that no longer receive patches.

Coverage

Related

More news on the same subject.