The attack works by catching WordPress mid-update. When an affected site installs a complete Core package, it unpacks the new files, including the WordPress installer, into a staging folder under wp-content/upgrade whose location is predictable. On many servers that folder can be reached from the web.
If an attacker requests the staged installer page, setup-config.php, at exactly the right moment, they can interact with that half-installed copy of WordPress and work their way to running PHP code on the server. Code execution on the server is the worst kind of web bug, because it can lead to stolen data or a full takeover of the site.
Wordfence, the WordPress security company that published the technical details, lists four things that have to line up for the attack to succeed:
- the staging path is predictable or the attacker manages to find it;
- the web server lets the public reach the staging folder and run PHP there;
- the update is a full package that includes the installer files;
- the attacker finishes before WordPress deletes its temporary files.
In lab tests that window lasted only seconds, which is why the bug is rated high rather than critical. But attackers have a simple answer to a short window: keep knocking.