- Patch the moment the fixed version exists; with a zero-day, your update speed is the only variable you control
- If the site ran a vulnerable version during the window, rotate the database password in BOTH the hosting panel and wp-config.php — a leaked config makes the old password public
- Rotate admin passwords and salts as well; assume config contents are known
- Scan for shells and rogue admins — file download is often the first step, not the whole attack
This post is part of our series on WordPress attacks in the last 10 years — one major attack per day, what it was, how to detect it, how to remove it and how to keep it out. This instalment covers BackupBuddy Zero-Day (CVE-2022-31474) (September 2022).
What happened
In September 2022 Wordfence disclosed that a flaw in the BackupBuddy backup plugin was being actively exploited before a patch existed — the definition of a zero-day that matters to owners. The flaw allowed unauthenticated attackers to download arbitrary files from the site, and the obvious target was wp-config.php: the file containing your database credentials, from which full compromise follows. The vendor patched quickly once notified (8.7.4.2 / 8.5.8.3), but the attempts had already scaled into the millions.
Who was exposed: BackupBuddy versions 8.5.8.0–8.7.4.1 — about 140,000 active installs. Why it mattered: Wordfence recorded roughly 5 million exploitation attempts — a striking ratio: dozens of attempts per installed site, because zero-days are sprayed at every fingerprintable target.
How this attack works
Zero-day economics explain the 5-million figure. The attackers’ cost per attempt is near zero (bots), and the prize per success is total (your config file). So they do not choose targets — they enumerate the entire plugin’s install base from fingerprints and fire at all of it. Whether your site is a bakery or a bank is irrelevant to the spray; only your version number matters.
The exploitation itself is usually automated end to end. Bots continuously scan the web reading plugin readme files and version strings; the moment a vulnerable version is fingerprinted, an exploit script fires — creating an admin account, uploading a web shell, or injecting a database payload, depending on the flaw. The site owner typically did nothing ‘wrong’ on the day it happened beyond running a popular plugin a few versions behind, which is why the median time from disclosure to mass attack — about five hours for the worst flaws in 2025 — matters so much.
Signs your site has it — and how to confirm
- Download requests for wp-config.php or other sensitive files in your server logs — the tell-tale of this flaw’s exploitation
- A backup plugin version inside a publicly announced affected range, during the announcement week
- Any plugin whose vendor announces an emergency release — treat the announcement itself as your alarm, not as news
- Database credentials used from unfamiliar IPs (your host can check) after a config leak
Confirm the plugin and its version on your site against the affected versions in the advisory — if you are at or below the vulnerable version, treat the site as exposed, not just at risk. Then check for the fingerprints of a successful exploit: admin users you did not create, files modified after the disclosure date, PHP files in uploads, and unfamiliar options or cron jobs in the database.
Step-by-step removal and recovery
Immediate actions for this attack
- Patch the moment the fixed version exists; with a zero-day, your update speed is the only variable you control
- If the site ran a vulnerable version during the window, rotate the database password in BOTH the hosting panel and wp-config.php — a leaked config makes the old password public
- Rotate admin passwords and salts as well; assume config contents are known
- Scan for shells and rogue admins — file download is often the first step, not the whole attack
The full protocol
- Back up first, labelled infected — you may need it for evidence or rollback.
- Update the vulnerable plugin immediately if a fix exists; if none exists, deactivate and delete it — an unpatched known flaw is an open door.
- Assume entry may already have happened: audit every administrator account (including in the database, where hidden admins do not show in wp-admin).
- Scan files and database: recently modified PHP, PHP in uploads, encoded payloads in wp_options, rogue cron jobs.
- Reinstall the plugin (and ideally core and theme) from clean official sources rather than trusting edited files.
- Rotate wp-admin, hosting, database and FTP credentials, and regenerate wp-config.php salt keys to kill every existing session.
- Verify with a fresh fetch of key pages and a server-side scan, then watch file-change alerts closely for two weeks — reinfection almost always means a persistence point survived.
How to prevent it
- Run a WAF with virtual patching: firewall vendors shipped rules for this flaw before many owners even saw the advisory, closing the zero-day gap
- Block web access to wp-config.php and other sensitive files at server level as defence in depth
- Keep an inventory of your plugins and their versions so ‘am I affected?’ is a 2-minute question
- Backups and config files should never be downloadable — test the URLs yourself
The defences repeat across this whole series for a reason: kept-updated software, unique passwords with 2FA, the fewest possible plugins, backups stored off the server, and monitoring that looks at your site the way an attacker — or Google — does. Sites rarely fall to one exotic trick; they fall to one ordinary gap.
FAQs
What does zero-day actually mean?
The attackers knew and were exploiting the flaw before the vendor had a fix available — day zero of the patch. It does not mean unstoppable; firewalls blocked this one for protected sites throughout.
Why would anyone attack my small site with a zero-day?
They didn’t choose your site; they scanned for the plugin and attacked every match. Small sites are hit by mass tooling, not by personal attention.
Is updating after the fact pointless if attempts already happened?
No — attempts are not successes. Sites behind firewalls or with blocked file access survived the spray. Patching also ends your eligibility for the long tail of later scans.
Next in the series and the full timeline: WordPress Attacks in the Last 10 Years — the complete guide.
JunoBizz audits, cleans and hardens WordPress sites — cloaked spam, rogue admins, poisoned plugins and everything in this series. Get the checks run before Google finds the problem.
Talk to JunoBizz