A single plugin or module installed in five minutes can undo years of careful hardening, and unvetted CMS extensions are now one of the most common ways attackers get into WordPress, Drupal and Joomla sites. If you run or maintain a CMS-based site, the risk usually doesn’t come from the core software. It comes from third-party code that nobody reviewed before it went live. This article covers how unvetted extensions create risk, what a practical vetting process looks like, and how to keep checking extensions after installation.
Why Third-Party Extensions Carry Most of the Risk
CMS cores are heavily scrutinized. WordPress core has a dedicated security team, a bug bounty program and automatic background updates for minor releases. Most of the roughly 60,000 plugins in the WordPress.org directory have none of that. Many are maintained by one person in their spare time.
Patchstack and Wordfence have reported the same split for several years in a row: well over 90% of newly disclosed WordPress vulnerabilities are in plugins and themes, not core. The usual bug classes show up again and again. These include missing capability checks on AJAX handlers, unsanitized output that leads to stored XSS, SQL injection through custom query builders, and file upload handlers that accept PHP files.
An extension runs with the same privileges as the CMS itself. A contact form plugin with a broken nonce check isn’t a small contact form problem. It can give an attacker the whole database. The same pattern shows up in plugin vulnerabilities across the WordPress ecosystem, where one popular plugin can expose hundreds of thousands of sites within hours of a public disclosure.
The Myth That Official Directories Are Safe
Many site owners believe that an extension listed in the official repository has been security-reviewed. That’s only partly true. WordPress.org runs an initial review when a plugin is first submitted. It checks for obvious guideline violations, not for logic flaws, and later updates are not manually audited before release.
The June 2024 supply chain incident made this clear. Attackers got hold of developer credentials and pushed malicious updates to several WordPress.org plugins, including Social Warfare. The injected code created rogue administrator accounts and sent the credentials to an attacker-controlled server. Every site with auto-updates turned on installed the malicious version without anyone acting.
A high install count doesn’t prove safety either. Popular plugins attract more researchers, so more of their bugs get found and fixed. They also attract more attackers, because a single exploit pays off on a much larger scale.
A Realistic Scenario: The Quiet Ownership Change
Picture a marketing team that runs a WooCommerce shop with 22 active plugins. One of them, a small social sharing widget installed in 2021, changes hands. The new owner ships an update that loads a remote script, but only for logged-out visitors from search engines. Administrators never see it.
Three weeks later, Google Search Console flags spam links. The developer checks the theme files and finds nothing. The core checksums verify cleanly. After two days of digging, the injected code turns up inside the plugin’s `includes/` directory, in a file that hadn’t existed in the previous version.
This pattern of ownership transfer followed by a malicious update has a documented history. The Display Widgets plugin was pulled from WordPress.org in 2017 after it was sold and began injecting spam into sites. The lesson is that vetting is not a one-time event. An extension you trusted last year may now belong to someone else.
How to Vet CMS Extensions Before Installation
An experienced application security engineer starts with metadata before reading any code. Check when the extension was last updated and how quickly the developer has responded to past security reports. Then search for the plugin slug in the WPScan Vulnerability Database or the Patchstack database. For Drupal, the key check is whether the module is covered by the Drupal Security Team’s advisory policy, which only applies to stable releases with the coverage badge.
After that, a short technical review catches most red flags. You don’t need a full audit. Thirty minutes is enough for a mid-sized plugin:
1. Grep for `eval(`, `base64_decode`, `gzinflate` and `create_function` – legitimate uses exist, but each one deserves an explanation.
2. Check every `wp_ajax_nopriv_` and `register_rest_route` call for capability checks and a `permission_callback`.
3. Look for outbound HTTP calls (`wp_remote_get`, `curl_exec`) to domains you don’t recognize.
4. Install it on staging and watch network requests and new database tables.
5. Confirm the license and source – never use nulled copies from download sites.
That last point matters more than it seems. Nulled themes and plugins often come with backdoors already installed, and some are designed to stay hidden until weeks after activation.
Common Mistakes When Managing Extensions
The first mistake is deactivating instead of deleting. A deactivated WordPress plugin still has its PHP files in `wp-content/plugins/`. If a file in it can be called directly without loading WordPress, it can still be exploited. Many arbitrary file upload exploits target standalone PHP files in exactly this situation.
The second is treating auto-updates as a security strategy. Auto-updates close known holes quickly, which is valuable. But as the 2024 incident showed, they also deliver compromised releases just as quickly. Sites that handle payments or health data benefit from a 24-48 hour delay on non-security updates, with a quick staging check before production.
The third is keeping extensions nobody remembers installing. A typical audit of a five-year-old site finds 6-10 plugins with no clear owner or purpose. Each one adds attack surface and gives you nothing back. Spotting abandoned plugins and replacing them should be a regular task, not something left for an emergency.
Edge Cases Where Standard Advice Doesn’t Fit
Teams of fewer than 10 people rarely have time for code review on every update. A practical alternative is to keep a short allowlist of trusted vendors and refuse anything outside it unless someone formally asks for it. Fewer extensions from well-staffed vendors beat many from unknown authors.
Regulated environments change the calculation. Under PCI DSS 4.0, a WooCommerce or Magento checkout page has to keep an inventory of scripts and justify each one, so an extension that injects JavaScript into checkout becomes a compliance issue. Under GDPR, a plugin that quietly sends visitor data to a third-party server can count as an unreported data transfer, whatever the plugin’s stated purpose.
Headless CMS setups are often assumed to be immune, but they aren’t. A Strapi or Directus plugin still runs server-side with database access. The attack surface moves from the rendered page to the API, but it doesn’t go away.
FAQ
How many plugins is too many for a WordPress site?
There’s no safe number. Twenty well-maintained plugins can be less risky than five abandoned ones. What matters is whether each plugin is still maintained, still needed, and has a clear owner on your team.
Can a vulnerability scanner detect a malicious extension?
Partly. Scanners reliably flag known vulnerable versions, injected scripts, malware signatures and suspicious outbound behavior. They’re less reliable at spotting a logic backdoor that only triggers under specific conditions, so a manual review before installation is still worth doing.
Is it safe to use extensions from premium marketplaces like CodeCanyon?
Paying for an extension doesn’t guarantee its security. Premium extensions are often reviewed less by outside researchers than free ones, and updates may depend on license keys that lapse. Vet them the same way you would a free plugin.
Summary: Treat Every Extension as Code You Now Own
Once you install an extension, you are responsible for its security, whoever wrote it. Vet extensions before installing them, remove what you don’t use, and watch for ownership changes and unexpected behavior after updates. That covers most of the extension risk a CMS site faces. A practical starting point for this week: list every installed extension, write down when each was last updated, and delete anything that hasn’t had an update in 12 months and that nobody on the team can explain.
