How this bug class keeps getting shipped

CISA added CVE-2026-119977 to the Known Exploited Vulnerabilities catalog on 2026-11-03. The class is older than most of the code it touches: a time-of-check to time-of-use (TOCTOU) race condition in WordPress Core's full-package upgrade flow, where predictable, web-accessible staging paths let an unauthenticated attacker win the race and execute code on the server during the upgrade window. Because this bug lives inside a privileged self-update routine, it needs no shell, no plugin, and no authenticated session. It needs a URL, a stopwatch, and a file.

This post covers that bug class, not any single vendor's weekly patch. Full-package self-upgrade is one of the most common high-privilege operations in modern web software, and it keeps shipping with the same anatomy: fetch an archive, stage it somewhere the web server can see, run integrity and permission checks on the staged copy, then swap it into place. Each of those verbs marks a syscall boundary, and each is a race if the staging ground is attacker-reachable before the swap.

Anatomy of the flaw

The TOCTOU pattern has three parts: a check, a use, and a window between them where an attacker can alter what was checked. In the self-upgrade variant, the shape is:

  1. The updater downloads a new release archive to a staging directory under the webroot or an otherwise web-visible path.
  2. The updater validates the staged tree: signature, hash, file list, and sometimes a version.php or manifest file, to confirm the payload.
  3. The updater uses that staged tree: it copies, renames, or includes files from the staging path into the live install, running whatever PHP ends up there under the web server's identity.

If the staging path is predictable and the web server executes files inside it, an attacker who can POST or PUT into that path during the window between step 2 and step 3 can replace a staged .php file with their own. The next include, require, or redirect pulls the attacker's file inside the upgrade process, with upgrade-level privileges and no CSRF token to clear. The signature check on the archive is irrelevant: the attacker is not modifying the archive; they are modifying what the upgrader does with it.

Here is the abstracted request sequence a defender should expect to see in logs. All hostnames are placeholders.

# 1. Updater fetches and stages (server-initiated, internal)
GET  https://downloads.example.com/wordpress-6.x.zip
# archive is unpacked to:
#   /var/www/example.com/wp-content/upgrade/wordpress-6.x/
# while the old tree is still live.

# 2. Attacker probes the predictable staging path (unauthenticated)
GET  https://www.example.com/wp-content/upgrade/wordpress-6.x/wp-load.php
# 200 OK during the window; 404 before and after.

# 3. Attacker drops or overwrites a staged file during the window
POST https://www.example.com/wp-content/upgrade/wordpress-6.x/wp-load.php
# body: <?php system($_GET['c']); ?>

# 4. Updater proceeds and copies staged tree into live path
# attacker's wp-load.php is now the live wp-load.php
GET  https://www.example.com/?c=id

The filenames and staging path differ per product; the rhythm is consistent across every documented instance of this bug class.

What the attacker needs

Three things, in descending order of difficulty:

Note what is not required: a valid user, an admin account, a plugin, a theme, or any customization. This is the floor, not the ceiling.

How to tell whether you are exposed

Three signals, in the order a defender should walk them:

  1. Inventory. Any public-facing WordPress install that performs core upgrades on the host, as opposed to a build-and-deploy pipeline that ships an immutable image, is in scope. Managed hosts that perform in-place core upgrades inherit the same window.
  2. Path reachability. From an unauthenticated client, probe wp-content/upgrade/ and wp-admin/includes/ style staging roots. If those paths render PHP under normal operation, you have the preconditions for every historical variant of this class, not just CVE-2026-119977.
  3. Window observability. Correlate POSTs to any path under the staging root with timestamps of upgrade initiation. A legitimate client should never write there. Any such write during an upgrade is the attack.

A minimal detection rule in an NGINX or ModSecurity front end denies write methods to the staging path and alerts on any request from a non-loopback source:

location ~* /wp-content/upgrade/ {
    limit_except GET { deny all; }
    access_log /var/log/nginx/upgrade_staging.log combined;
    # Alert if remote_addr != 127.0.0.1 during normal operation.
}

Why this bug class keeps shipping

Three structural reasons, each worth fixing at the architecture level:

Other recent catalog additions show adjacent failure modes in the same family. CVE-2026-102895 in GPUStack is an improper-authentication defect that lets an unauthenticated caller POST to /v2/inference-backends/from-yaml and achieve code execution: a privileged administrative surface shipped reachable. CVE-2026-123158 in OpenSSH on Linux is an unexpected-return-value authentication bypass. None are TOCTOU, but all three share the DNA of a privileged code path that assumed a precondition it did not enforce.

Remediation under BOD 26-04

CISA's current KEV remediation directive is BOD 26-04 (Prioritizing Security Updates Based on Risk), effective 2026-06-10, and it carries the KEV criteria forward from its predecessor. Federal civilian agencies must remediate KEV entries on the schedule the directive sets; private-sector operators should treat KEV listing as conclusive evidence of in-the-wild exploitation and prioritize accordingly. For CVE-2026-119977 specifically, that means applying the vendor fix, confirming that auto-updates on affected installs have already run, and, as a defense-in-depth step, denying external write methods to the upgrade staging path in the fronting proxy. For the bug class as a whole, move upgrades off the live host where possible, randomize staging paths where that is not feasible, and treat any unauthenticated write into a staging directory as an incident, not a scanner.

Verifiable security.