
Multi-threaded PoC exploiting CVE-2026-119977, a TOCTOU race in WordPress core upgrade staging paths that yields unauthenticated remote code execution.
Unauthenticated remote code execution via predictable staging path during full-package core upgrades.
During a full-package WordPress core upgrade the updater unpacks the new release into a deterministic web-reachable directory under wp-content/upgrade/.
The staged tree contains wp-admin/setup-config.php (and related installer endpoints).
An unauthenticated client that hits the path inside the short race window obtains code execution under the web-server user.
Affects every branch from 4.7 through 7.1.3.
Patched in 7.1.4 and corresponding back-ports, but residual race windows remain on installs that still perform full-package upgrades without the randomized suffix enforced at runtime.
Fixed: 7.1.4 / 7.0.8 / 6.9.11 / … / 4.7.39
WP_Upgrader constructs the working directory name solely from the package basename (wordpress-X.Y.Z).
No random token is appended before the files become HTTP-reachable.
The installer scripts ship inside that tree and execute as ordinary PHP when requested.
TOCTOU between unpack completion and cleanup (CWE-367).
python3 -m pip install -r requirements.txt
python3 exploit.py -u https://target.tld -c "id" --threads 64
Common flags:
-u, --url target base URL
-c, --cmd command to execute (written via the race)
-t, --threads concurrent probes (default 32)
--path force staging path if known
--timeout request timeout in ms
Successful hit returns the command output.
Implements continuous multi-threaded polling of the predictable staging path, race-window detection and payload injection through the staged installer. Works against still-vulnerable branches (4.7–7.1.3) and against installs that still use the deterministic staging path during full-package upgrades (residual race window).
For authorized security research only