WordPress Security Issues: An A-Z Guide to Attacks and Why Hackers Target WordPress
July 8, 2023 0 comments
Most WordPress security issues come from plugins, not WordPress itself. Patchstack’s 2026 report counted 11,334 new WordPress vulnerabilities in 2025: 91% in plugins, 9% in themes, and just 6 in core. The most common vulnerability types are cross-site scripting (XSS), broken access control, cross-site request forgery (CSRF), and SQL injection. Hackers rarely pick a site by hand; bots scan for known vulnerable plugins and attack every site that has one. Keeping plugins updated, removing unused ones, and using two-factor login prevent most attacks.
In this post
Why hackers target WordPress sites
Small-business owners tend to ask some version of “why would anyone hack my site? We’re a small accounting firm.” It’s a reasonable question with an unsatisfying answer: nobody chose your site. A bot did, and it chose thousands of others in the same minute.
WordPress runs a huge share of the web, and most WordPress sites run the same popular plugins. So when a vulnerability in one plugin goes public, attackers write a script that scans the internet for that plugin’s version number and tries the exploit on every site it finds. Your site is a match in a database query, not a target someone researched. (This is also why “we’re too small to bother with” is the most expensive sentence in WordPress security.)
What do they want once they’re in? Usually one of these:
- Your traffic. Spam redirects to scam pages, or hidden links to boost someone else’s rankings.
- Your server. Sending spam email, mining cryptocurrency, or joining a botnet that attacks other sites.
- Your data. Customer emails, order details, and admin login credentials that can be reused elsewhere.
- Your visitors. Injected scripts that steal card details at checkout or push malware downloads.
- Your reputation. Defacement for political or ideological reasons, or bragging rights in hacker forums.
Our 2023 posts spent a lot of words on “black-hat, white-hat, and grey-hat hackers” and the “mysterious allure of hacking.” I’ve cut most of that. For a site owner, the motive matters less than the method, and the method is almost always automated.
What the 2026 numbers say
The best public data comes from Patchstack’s State of WordPress Security in 2026 report, which covers vulnerabilities disclosed in 2025. The headline figures:
- 11,334 new vulnerabilities in the WordPress ecosystem, a 42% increase over 2024.
- 91% were in plugins and 9% in themes. WordPress core had just 6.
- 46% had no fix from the developer by the time they were publicly disclosed.
- For heavily exploited vulnerabilities, the weighted median time to the first exploitation attempt was 5 hours.
Read that last one again. Five hours. “We’ll update plugins at the end of the month” doesn’t work when the attack scripts are running the same afternoon the bug goes public.
And the 46% figure is the uncomfortable one. Nearly half the time, there’s no update to install yet. That’s why removing plugins you don’t need, and using a firewall that can block known exploit patterns, matter as much as clicking Update.
The A-Z of WordPress attacks
This is the list from our 2023 post, updated and tightened. It’s long, so skim for the ones that match what your site uses.
Arbitrary file upload and overwrite. A weak plugin lets an attacker upload a file (often a PHP web shell disguised as an image) or replace an existing file. Either one can mean full control of the site. Upload forms and media-handling plugins are the usual source.
Authentication bypass. A flaw lets someone log in as another user, sometimes an administrator, without the password. Forged cookies, broken “login with” integrations, and weak password-reset flows are typical causes.
Backdoors. Once inside, attackers plant hidden code so they can get back in after you patch the original hole. This is why “I updated the plugin” doesn’t mean the site is clean.
Broken access control and missing authorization. The plugin forgets to check whether the person making a request is allowed to make it. A subscriber, or even a logged-out visitor, can then change settings, delete content, or create admin users. It’s the second most common vulnerability type in plugins, and Patchstack’s 2026 report says it was the most exploited.
Brute force and credential stuffing. Bots try thousands of passwords, or reuse passwords leaked from other sites, against wp-login.php and XML-RPC. Two-factor authentication stops nearly all of this.
Cross-site request forgery (CSRF). An attacker tricks a logged-in admin into clicking a link that quietly performs an action, like changing a setting or adding a user. Plugins that skip WordPress nonces are vulnerable.
Cross-site scripting (XSS). The attacker gets JavaScript into a page through a weak plugin, theme, or form. Stored XSS saves the script on the site, so every visitor who loads the page runs it. Reflected XSS lives in a crafted URL and affects whoever clicks it. XSS is the most reported vulnerability type in WordPress plugins by a wide margin, at about 41% of 2025 disclosures in Patchstack’s statistics.
DDoS attacks. Floods of traffic that knock a site offline. Usually handled at the hosting or CDN level rather than inside WordPress.
Insecure direct object references (IDOR). Changing an ID in a URL or request (an order number, a user ID) shows or edits someone else’s data, because the plugin never checks ownership.
IP spoofing to bypass protection. Some security plugins trust a header for the visitor’s IP address. Attackers fake that header to get around rate limits and blocklists.
Local and remote file inclusion (LFI and RFI). The site is tricked into running or revealing a file from its own server (LFI) or from an attacker’s server (RFI). Both can expose wp-config.php or run arbitrary code.
Malvertising and SEO spam. Injected ads, redirects, or hidden links that send your visitors to scams or borrow your rankings. Often the first visible sign of a compromise, and sometimes shown only to visitors coming from Google, so the owner never sees it.
Object injection. Unsafe handling of serialized PHP data lets attackers inject objects that trigger dangerous code paths.
Open redirects. A URL on your domain forwards visitors to any site the attacker chooses, which makes phishing links look trustworthy.
Phishing pages. Attackers host fake login pages for banks or email providers inside your site’s folders, using your domain’s good name.
Privilege escalation. A low-level account (subscriber, customer) is turned into an administrator through a plugin flaw, often in membership, LMS, or ecommerce plugins.
Server-side request forgery (SSRF). The site is made to send requests to internal or external servers on the attacker’s behalf, which can expose private services.
SQL injection. Malicious input reaches the database query, letting attackers read, change, or delete data. Unauthenticated SQL injection, which needs no account at all, is among the most dangerous bugs a plugin can have.
Supply chain attacks. A plugin itself is compromised, sold to a new owner who adds malicious code, or distributed as a “nulled” free copy of a premium plugin with a backdoor built in. Never install nulled plugins.
XML-RPC abuse. The xmlrpc.php endpoint can test many passwords in one request. If nothing on the site needs it, block it.
If that list feels overwhelming, here’s the reassuring part: almost every item starts with “a weak plugin.” Fix how you choose, update, and remove plugins, and most of the alphabet goes away.
How to protect a WordPress site
In rough order of how much risk each one removes:
- Update fast. Turn on automatic updates for plugins you trust, and check the rest at least weekly. With exploitation measured in hours, monthly isn’t enough.
- Remove what you don’t use. Deactivated plugins can still be attacked if their files are on the server. Delete them.
- Use two-factor authentication for every admin and editor account. WordPress.org has a guide to two-factor authentication.
- Add a web application firewall at the host, CDN, or plugin level. It’s your cover for that 46% of vulnerabilities with no patch yet.
- Give people the lowest role they need. Not everyone who writes posts needs to be an administrator.
- Keep off-site backups and test a restore at least once. A backup you’ve never restored is a hope, not a plan.
- Follow WordPress’s own hardening guide for file permissions, wp-config.php, and disabling file editing in the dashboard.
- Watch the logs. An activity log plugin shows new admin users, plugin installs, and file changes, which are early signs of trouble.
If a site does get hacked, cleaning it is a job for someone who has done it before. Restoring a backup without finding the entry point often leaves the same hole open for the next bot.
Attack types at a glance
| Attack type | Usual entry point | Main defense |
|---|---|---|
| Cross-site scripting (XSS) | Plugin or theme input fields | Prompt updates, firewall rules |
| Broken access control | Plugin missing permission checks | Updates, remove unused plugins |
| SQL injection | Plugin database queries | Updates, firewall rules |
| File upload and inclusion | Upload forms, media plugins | Updates, block PHP in uploads folder |
| Brute force | wp-login.php, XML-RPC | Two-factor login, block XML-RPC |
| Supply chain | Nulled or sold plugins | Official sources only, review new owners |
Checklist
- Every plugin and theme is up to date, and auto-updates are on where you trust the developer.
- Unused plugins and themes are deleted, not just deactivated.
- Every admin and editor account uses two-factor authentication.
- A web application firewall is in place at the host, CDN, or plugin level.
- User roles are the lowest each person needs.
- Off-site backups run daily and a restore has been tested.
- File editing in the dashboard is disabled in wp-config.php.
- No nulled or unofficial plugins are installed.
FAQ
What is the biggest security issue in WordPress?
Vulnerable plugins. Patchstack’s 2026 report found that 91% of the 11,334 WordPress vulnerabilities disclosed in 2025 were in plugins, 9% in themes, and only 6 in WordPress core.
Why do hackers target small WordPress websites?
Mostly they don’t target them by hand. Bots scan the internet for sites running a plugin version with a known vulnerability and attack every match. A small site is as likely to be hit as a large one if it runs the same vulnerable plugin.
How quickly do I need to update WordPress plugins?
As soon as a security fix is released. Patchstack reports a weighted median of about 5 hours from disclosure to the first exploitation attempt for heavily exploited vulnerabilities, so waiting a week or a month leaves a real gap.
Is WordPress itself secure?
WordPress core has a strong security record and a dedicated security team. Most risk comes from third-party plugins and themes, weak passwords without two-factor authentication, and sites that aren’t kept updated.
That’s the alphabet, more or less. If you’ve seen an attack type that isn’t here, add it in the comments and I’ll include it.
Rather someone else kept watch?
Our WordPress maintenance team handles updates, backups, security monitoring, and hacked-site cleanup, so a five-hour exploit window doesn’t land on you.
Addendum: checking your site with AI, safely
Added November 2026. If you’d like an AI assistant to help you check a site for these issues, use a tool that can only look, not change. We built two free ones for exactly this.
- Auditra is a read-only WordPress plugin that lets Claude or any MCP-compatible AI assistant inspect your plugins, known vulnerabilities, cron jobs, and autoloaded data, then explain what it finds in plain English.
- The WordPress Security Audit skill is a read-only Claude skill that checks plugin and theme versions against vulnerability databases, core files, wp-config settings, and signs of malware.
Either one will tell you, in a few minutes, which items on the A-Z list above apply to your site.
A correction to our 2023 version
Updated November 2026. This post now also includes our September 2023 article on why hackers target WordPress websites, which covered the same ground. Our 2023 version described “missing authorization” as an attacker exploiting a plugin “to gain authentication.” That mixed up two different problems. Missing authorization means a plugin doesn’t check whether a user is allowed to perform an action, so someone with a low-level account, or no account, can do things only an admin should. We’ve fixed the definition above. Sorry for the confusion, and if you spot anything else, please tell us in the comments.
Related Posts
-
November 22, 2012
Responsive web design to make your site mobile ready – Is it worth doing?
You own a website successfully now but did you ever find out if your website is accessible and viewable with any of the smartphones? It is great if you have your site designed aesthetically using Flash or any other jazzy technology unless you have your website compatible with the current smartphones, your
web design, Welcome0 comments -
September 28, 2020
Design Thinking for Web Developers
Every now and then new technology buzz words pop up. But, Designing Thinking is not just another buzz word. More importantly, Design Thinking is not just for designers or graphic artists. Design Thinking is Solution-focused thinking for everyone who develops something new as a product. It could be a tangible


