A vulnerability has been discovered in WordPress that allows attackers without an account to execute arbitrary PHP code on the server. Attackers began checking sites for exploitation just a few minutes after the protective rule appeared.

The vulnerability received the identifier CVE-2026-119977 and a CVSS score of 8.1. The issue affects WordPress Core versions 4.7 to 7.1.3. The developers have closed the flaw in the October 28 release of WordPress 7.1.4, while also preparing fixes for supported older branches.

Wordfence researchers recorded more than 18,500 suspicious requests in the first 21 hours of observation. The first activation of the protective rule occurred just nine minutes after it was published on October 28. This activity indicates that attackers are quickly interested in the new vulnerability, but the number of requests does not mean that the attackers managed to hack 18,500 sites. Wordfence has not reported any confirmed cases of successful exploitation.

The error is related to the WordPress update mechanism. When the system installs the full version of a service pack, it first unpacks the files into a temporary directory inside wp-content/upgrade. Among the temporary files is the WordPress installer, which, with certain web server settings, is accessible from the outside and can execute PHP code.

The attacker does not need to first obtain an administrator account. All you need to do is locate the temporary directory and contact the installer during the short period while WordPress unpacks the update. The researchers estimated the duration of the vulnerable window to be several seconds. After the operation is completed, the system deletes temporary files, so the attacker must constantly check the availability of the desired path.

Wordfence has detected signs of automated attacks. The two most active sources continuously checked small groups of sites for approximately 14.5 hours. Other attackers have experimented with different temporary directory names and installer versions. This behavior is consistent with attempts to catch a short window of vulnerability during an update.

In WordPress 7.1.4, the developers changed the mechanism for preparing temporary files. The system now uses a random directory name instead of a predictable path, adds additional protection against direct access, and blocks insecure movement of temporary configuration data. The fix has also been pushed back to older WordPress branches, starting with version 4.7.

Fixes have been prepared for the vulnerability in 25 releases. Depending on the branch installed, admins should migrate to WordPress 7.1.4, 7.0.8, 6.9.11, 6.8.12, or the appropriate patched version of the older branch. WordPress 4.6 and earlier versions no longer receive security updates, so site owners will have to upgrade to a supported version.

Release 7.1.4 addresses not only the problem of remote code execution, but also other vulnerabilities. In total, the update fixes 22 security issues, including multiple cross-site scripting (XSS) variants, access control errors, information disclosure, and vulnerabilities in the editor block API. Some of them require an account with certain rights, while a critical problem with the update mechanism does not require authentication.

Wordfence released a protective rule for paid users on October 28th. Owners of the free version will only receive similar protection on November 27, as the company extends the rules to free users with a 30-day delay. For protection against direct access to temporary PHP files to work, you must enable the Extended Protection mode, in which the firewall checks the request before transferring control to the requested file.

Experts also recommend temporarily disabling external access to the wp-content/upgrade directory at the web server or other infrastructure component level before launching the update. This measure is especially useful for administrators who do not have adequate protection at the WordPress firewall level. After the update, it is worth checking the access logs for suspicious access to temporary installation files, as well as looking for unknown administrator accounts and extraneous PHP files.

WordPress site administrators should check the installed version and install the appropriate patch instead of relying solely on automatic updates. The rapid emergence of automated requests shows that attackers are closely monitoring the latest patches and begin looking for exploits almost immediately after information about vulnerabilities is published.