Many people wonder how WordPress can be vulnerable to attacks despite its popularity and active maintenance. Others ignore the risk entirely. Let’s take a closer look.
What is a vulnerability?
WordPress is written in the PHP language.
PHP code makes “dynamic” websites possible. That means the content is generated on every page by a PHP program. A dynamic site also allows interaction with visitors. In technical terms, it can receive and process requests.
This strength is also a weakness, because it can leave room for unwanted interactions, making it possible to hack a website.
This is called a “security flaw” or “vulnerability.”
Vulnerabilities in PHP

Vulnerabilities in PHP code can have various causes.
Here are a few common examples.
- Unvalidated input: When PHP code accepts user data, such as a form submission or a request, without proper validation, it can be vulnerable to malicious code injection attacks.
- Excessive permissions: Granting excessive permissions to files and users can allow unauthorized tampering.
- Poor error handling: Revealing sensitive information in error messages can give attackers clues to exploit the system further.
In addition, there can be vulnerabilities in PHP itself. The PHP engine sometimes contains security flaws if it is not kept up to date. (see image)
Other flaws not directly related to PHP, such as XSS vulnerabilities, are also common. They allow malicious code to be executed.
Let’s look at how this plays out in practice for WordPress.

Vulnerabilities in WordPress sites
Security flaws in WordPress

WordPress is a robust content management system, but it contains nearly a million lines of PHP code (924,096 lines at the moment).
WordPress also means 59,772 plugins and 11,378 themes available on wordpress.org alone. That’s millions more lines of code available to install on your site.
This wealth of code creates fertile ground for security flaws. The more code you pile on, the more risk you take on. As a result, new vulnerabilities are discovered every day. They can be found in the WordPress core, but also in the themes and plugins you have installed.
Detecting, fixing, and disclosing flaws
When someone detects a flaw (an independent developer, a “white hat,” or a security organization), they notify the developers of the affected script.
If the developers are responsive, they fix the flaw and release a patch.
Then, typically 30 to 90 days after its discovery, the security flaw is disclosed publicly. This both gives credit for the discovery to whoever reported it and warns users of the script about the risk they run if they don’t update.
Current unpatched flaw
WordPress currently has an unpatched flaw dating back to version 6.1.1 (so for several months now). It allows a website to be used to send requests to other targets. It can be mitigated by blocking access to xmlrpc.php and disabling WordPress pingbacks (a hardening step I had already applied to every site I manage, before this flaw was even detected).
When is WordPress vulnerable, and what should you do?
Disclosed flaws
Once a flaw is disclosed, every installation running the vulnerable script is, by definition, affected. Attackers are likely to exploit the flaw if that’s your case.
There are then two cases of vulnerability:
- Your site has a script (WordPress, plugin, theme) with a known flaw that the developers have not fixed. Development of that script may have been abandoned. In that case, you should deactivate the script or replace it with a non-vulnerable one that is better maintained by its developers.
- Your site is not up to date. You haven’t fixed the security flaw. So you need to run updates as regularly as possible and make sure you don’t have any obsolete scripts (which would eventually put you in the previous case).
“Zero-day” flaws
Sometimes attackers find a flaw before it has been disclosed and fixed. They exploit it right away. This is called a “zero-day” flaw.
The more popular a script is, the harder attackers will look for zero-day flaws in it. It’s rare, but it happens.
Here is another reason to build simple sites: the more popular plugins you stack up, the more vulnerable your WordPress site becomes. Not only to zero-day flaws, but to flaws in general.
To protect against zero-day flaws, the server hosting your site must be secured. Among other things, it can block suspicious attacker requests with a web application firewall, then block attacking IPs with a tool like fail2ban. This is generally not the case with shared hosting plans. The exception is HaiSoft, where I pushed for these protections, which greatly reduced the number of hacks. But it can create false positives: legitimate requests getting blocked, especially with WordPress builders (Elementor, Divi, WP-Bakery, and others). That means more technical support is needed, which is why most providers don’t implement this kind of protection. Security is always more complex than no security.
Even with every possible safeguard in place, keep in mind that some attack requests can slip through the net. Zero risk does not exist, and anyone who claims otherwise is either ignorant or lying.
Since perfect security doesn’t exist, assume your site could be hacked tomorrow. If that happens, what do you do? You’d better have an up-to-date backup that is easy to restore and not stored inside your site.
Conclusion
Hacks don’t only happen to other people. Very regularly, WordPress site owners come to me with a hacked website to repair.
Every computer system is potentially vulnerable, including your WordPress site. The challenge is to minimize the risk of being hacked by applying every preventive measure. That starts with an up-to-date, secured server capable of blocking attacks. Then it takes regular monitoring of your WordPress site and updates as frequent as possible, constant checks for known security flaws, and quick action when something goes wrong. In every case, an off-site, automated backup that is independent of your site must be made daily. That is precisely the set of services you’ll find in my WordPress Webmastering plans.
If your site matters to your business, don’t wait until you get hacked. Get ahead of it and have your site checked with a WordPress security audit, or go straight to my Webmastering plan.









Leave a Reply
You must be logged in to post a comment.