psf-wordpress-upgrade-check(8)
WordPress core upgrade-window remote code execution: read-only checker (v1)
CVE-2026-119977
If this software is helpful, consider a donation to our 501c3 nonprofit:
https://privacysafe.foundation
Fixed on 28 October 2026 in WordPress 7.1.4 and the matching branch releases. CWE-367, a
time of check to time of use race, CVSS 3.1 8.1 (High, by the CVE Numbering Authority,
Wordfence; the WordPress project rates it low). Exploitation attempts began within hours
of the release, and CISA added CVE-2026-119977 to its Known Exploited Vulnerabilities
catalog on 3 November 2026. Reported by Umut Bayram (Picus Security).
While WordPress applies a full core update it unpacks the new release into a folder under
wp-content/upgrade/, and on most servers that folder is reachable over HTTP. The unpacked
copy is a second WordPress with its own setup-config.php installer, and it cannot see the
live wp-config.php, so it offers to set itself up. An unauthenticated visitor can finish that
installer during the update, which writes a wp-config.php into the staging folder; the
updater then copies that file over the live wp-config.php. The site now uses the attacker's
database, the attacker creates the first administrator, and a plugin upload runs PHP as the
web server user. It needs the update to be running, which is only seconds on most sites.
What the fix changed (WordPress 7.1.4, as the researcher describes it): the staging
folder gets a 16 character random suffix; wp-content/upgrade/index.php is kept; and
wp-config.php is added to the skip list of the copy in update-core.php. The first update
from an unfixed release is still exposed to the temporary installer, because the old
updater does the unpacking, so block the folder before you update.
Affected: WordPress 4.7.0 through 7.1.3 (the CVE record), in every branch.
Fixed: 7.1.4, 7.0.8, 6.9.11, 6.8.12, 6.7.11, 6.6.11 and so on down to 4.7.39. A branch's
fixed number is the release after its last affected one in the CVE record; on 28
October WordPress said the older backports would ship as they became ready.
Not fixed: WordPress 4.6 and older no longer receive security fixes. The CVE record lists
4.7 and later, and the researcher reports the same updater behavior since 2.7.
Less exposed: 4.4 through 5.8 add a random suffix to the staging folder name, which the
researcher says makes the path guessable only if something else discloses it.
Workaround, from the researcher and Wordfence: deny web access to wp-content/upgrade/ (WordPress
reads and writes it through the filesystem and never serves it), before you update. A manual
update outside the web root also avoids the temporary installer; wp core update does not,
because it uses the same updater. This script only reads; "rules" prints the lines to add.
Usage:
./wordpress-upgrade-check.sh [check] [DIR ...]
check (default) find WordPress under DIR, read each version, look for the three fixes in
the source, look for a web server rule that blocks wp-content/upgrade/, and
list leftover files in it. Exit 0 = nothing exposed, 1 = an install without
the fix, or one whose state is unclear.
hunt [DIR ...] look in web server logs for requests under /wp-content/upgrade/ and in each
install's wp-content/upgrade/ for a wp-config.php or other PHP file. Exit 0 =
nothing found, 1 = a lead. A clean hunt means the published indicators were
not found; it does not show that the live wp-config.php is the original one.
rules print the nginx, Apache and .htaccess lines that deny web access to
wp-content/upgrade/. It changes nothing.
version print the script version.
Env: WUP_LOGS (space separated paths or globs) names web server logs. WUP_CONF (space
separated paths or globs) names the web server configuration to read for a blocking rule.
Containers: with no directory argument the check also copies the files it reads from running
docker and podman containers (SCAN_CONTAINERS=1, the default; 0 skips them) and judges them like
host installs. The copies are temporary: a path shown as .../docker_NAME_PATH is the PATH inside
the container NAME.The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.