- Update form plugins immediately on any security release; check the changelog rather than dismissing the notice
- Remove upload fields from public forms unless they are essential, and restrict file types if they are
- Keep CAPTCHA (or an equivalent) on every public form — it raises the cost of automated probing
- If a form plugin is suspect during an incident, taking the form offline temporarily is a legitimate stopgap — a missing form costs enquiries; a compromised form can cost the site
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 Ninja Forms Critical Flaw and the Forced Update (2022) (June 2022).
What happened
Contact-form plugins appear in this timeline again and again for a structural reason: a form is a public, unauthenticated input that reaches deep into WordPress — file uploads, database writes, email sending, AJAX handlers. In June 2022 a critical code-injection flaw in Ninja Forms (affecting versions back to 3.0) was assessed as so urgent, with exploitation suspected, that WordPress.org force-updated the plugin across its install base. Site owners who woke to find their plugin updated without them had been rescued by the platform’s emergency brake.
Who was exposed: Ninja Forms — a contact-form plugin installed on over one million sites. Why it mattered: WordPress.org used its rare force-update power to patch sites automatically because the flaw was assessed as critical and likely exploited — a signal of severity worth understanding.
How this attack works
Form plugins process whatever strangers submit, and their handlers run through admin-ajax and REST routes that must carefully check capabilities and sanitise input. When one of those checks is missing, a stranger’s form submission becomes code execution or settings control. In our own JunoBizz incident in November 2026, the attackers were actively probing through the site’s contact form within hours of a cleanup — form endpoints are where attackers knock first, because they are designed to accept input from anyone.
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
- A form plugin you installed years ago and never think about — forms are set-and-forget, which is exactly the problem
- Form submissions from gibberish names with spam or slang content (crews test forms after and during attacks)
- File-upload fields on public forms — the highest-risk form feature there is
- Missing or lapsed CAPTCHA on enquiry forms
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
- Update form plugins immediately on any security release; check the changelog rather than dismissing the notice
- Remove upload fields from public forms unless they are essential, and restrict file types if they are
- Keep CAPTCHA (or an equivalent) on every public form — it raises the cost of automated probing
- If a form plugin is suspect during an incident, taking the form offline temporarily is a legitimate stopgap — a missing form costs enquiries; a compromised form can cost the site
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
- Treat form plugins as critical infrastructure in your update routine, equal to your builder and shop plugins
- Prefer maintained form plugins with a visible security track record, and delete form plugins you replaced but never removed
- Review stored form entries for attacker test submissions after any incident
- Watch form endpoints in your security logs after cleanups — probing resumes quickly
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
Why did WordPress update my plugin without asking?
Force-updates are reserved for critical, widely-exploited flaws. WordPress.org can push a security fix to sites with the plugin installed; in 2022 it judged the risk of waiting for owners to act as higher than the risk of updating automatically.
Are free form plugins unsafe?
Not categorically — maintenance is the variable. A popular, actively maintained form plugin with prompt patches is a reasonable choice; an abandoned one is not.
My contact form has no upload field. Am I safe from form attacks?
Safer, not immune. Handlers can still carry injection and access-control flaws, which is why updates and CAPTCHA still matter.
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