CVE-2026-119977 hit CISA’s Known Exploited Vulnerabilities catalog on November 3. The description is deceptively simple: a time-of-check time-of-use race condition in WordPress Core’s full-package upgrade process lets unauthenticated remote code execution. But the mechanism — predictable staging paths during the upgrade window — is a class of bug that shows up in every CMS, framework, and package manager that unpacks over live files.
Wordfence blocked 13,095 attacks targeting this vulnerability in the 24 hours after it entered KEV. CISA ordered federal agencies to patch by November 6. The fix went out with WordPress 7.1.4 on October 28. If your site is still on 7.1.3 or earlier, you’re in the window.
How the Upgrade Works
When you click “Update Now” on a full Core package, WordPress follows this sequence:
- Download the
.tar.gzpackage to a temporary directory - Extract the archive contents into
wp-content/upgrade/wordpress/ - Compare files and replace the live installation
- Delete the staging directory
The vulnerability lives in step 2: the staging directory path is predictable (/wp-content/upgrade/wordpress/). Until step 3 runs, all the extracted files are accessible at their normal URLs under that path. The index.php in the staging directory will execute — it’s real PHP, real WordPress bootstrap, real database queries.
If an attacker knows when a site is updating, they can hit http://target/wp-content/upgrade/wordpress/index.php during the window and get a working WordPress instance running from the new version’s code.
Why It’s Exploitable
CVE-2026-119977 is specifically a TOCTOU: the code checks that the upgrade directory is empty before extracting, then assumes it stays empty until extraction completes. But extraction is synchronous in most PHP deployments — so why does the window exist?
The answer is in the details of the Core upgrader. The extraction happens in chunks for large packages, and between chunks the script yields back to the request loop. During that yield, the web server can serve requests from the partially-extracted directory. More importantly, the upgrader checks for an existing lock file, but the lock is only released after step 3 completes. If the site is busy, a second request can slip through the lock check between extraction and replacement.
The race window is small — typically a few hundred milliseconds to a few seconds depending on package size and server load. But 13,095 automated attackers in 24 hours means the window is wide enough to exploit, and the predictable path means no discovery phase is needed.
What Attackers Execute
The staging directory contains the full new version of WordPress. When hit during the window, the attacker gets:
index.php— a working WordPress installation with the new version’s codewp-admin/— admin interface, fully functionalwp-content/— themes and plugins from the new package- Database connectivity — the staging instance connects to the same database
This means the attacker can execute arbitrary plugin code, install a backdoor plugin, or run wp-cli commands. The most common exploit pattern: upload a minimal PHP shell to wp-content/upgrade/wordpress/wp-content/uploads/ during the window, then hit it via its normal upload path after the upgrade completes.
The Scope
Affected versions: WordPress 4.7.0 through 7.1.3. That’s every version released in the last eight years. WordPress 7.1.4 (released October 28) fixes the issue.
The fix in 7.1.4 randomizes the staging directory name (wp-content/upgrade/<random>/wordpress/) so attackers can’t predict the path ahead of time. They still see the directory appearing, but the extracted files are only reachable after the name is generated.
Detection
You can detect exploitation of this vulnerability in two ways:
1. Upgrade log analysis. Check your WordPress upgrade logs (wp-content/debug.log if debug mode is on, or server error logs) for entries around update times. An upgrade that shows “extraction succeeded” but no corresponding “replacement succeeded” suggests the window was active.
2. Upload directory anomalies. Look for PHP files in wp-content/uploads/ with suspicious names or timestamps that don’t match any upload action. An attacker who uploaded a shell during the upgrade window will leave it behind after replacement.
# Find recently modified PHP files in uploads
find /var/www/html/wp-content/uploads -name "*.php" -mtime -7 -type f
3. Admin user creation. Check for newly created admin accounts around update times:
SELECT user_login, user_registered FROM wp_users WHERE user_registered > DATE_SUB(NOW(), INTERVAL 7 DAY);
Why This Pattern Keeps Returning
The upgrade-window bug isn’t unique to WordPress. It shows up in:
- Drupal — file_directory_temp before symlink swap
- Joomla — administrator/index.php staging path
- Laravel Mix / Vite — asset compilation during hot reload
- Any package manager that extracts over live directories
The pattern: unpack to a known path, do work on the unpacked files, then atomically replace the old with the new. If the atomic step isn’t truly atomic (and few are), you get a window.
WordPress solved it by randomizing the staging path. Other ecosystems solve it differently: some use a .maintenance flag that blocks access during updates, others use a two-phase commit pattern where the old code stays active until the new code passes a health check.
The Takeaway
CVE-2026-119977 is a reminder that the moment between “downloaded” and “installed” is the most exposed state a system can be in. During that window, the new code runs with the old system’s credentials, configuration, and database. If an attacker can reach it, they own it.
Update your WordPress sites. Check the uploads directory. And if you’re building something that extracts over live files, randomize your staging paths.
References: