In September 2026, attackers began exploiting a file-inclusion flaw in WordPress core within hours of the fix. Here's what file inclusion means in plain terms, what it could cost a business, and why ageing PHP sites are especially exposed.
Most websites built with PHP decide what to show a visitor by loading files from the server: one file for the home page, another for the contact page, another for the shop. That design is simple and has served businesses well for decades. It also creates one of the oldest security flaws on the web, called file inclusion, where an attacker gets to choose which file the server loads and runs.
It sounds like a problem from 2006. It isn't. On 22 September 2026, WordPress released a fix for a file-inclusion flaw in WordPress core itself. According to Patchstack, a WordPress security company, attackers were trying to exploit it within hours. Three days later, the US Cybersecurity and Infrastructure Security Agency (CISA) added it to its catalogue of vulnerabilities known to be exploited in the wild.
If your business runs a WordPress site, or any older PHP application, this is worth ten minutes of your attention.
When a stranger gets to choose what your server runs
Think of your web server as a filing room. When a visitor asks for a page, the application walks to the right drawer, takes out the right file and acts on it. File inclusion happens when the visitor, rather than the application, gets to say which drawer to open. A well-crafted request can point the server at a file it was never meant to touch.
There are two broad versions. In the first, the attacker can only point at files already on the server, which may expose sensitive information or, in some setups, let them run code. In the second, older version, the attacker can make the server fetch instructions from a location they control on the internet. That second version was so damaging in PHP's early years that PHP 5.2.0, released in November 2006, switched it off by default, and later versions deprecated the option altogether.
The WordPress flaw, recorded as CVE-2026-87902, belongs to the first group. The WordPress security advisory describes it as letting an attacker who isn't logged in make WordPress load a PHP file of their choosing from elsewhere on the server, instead of the page template it meant to load. WordPress rates it Critical. Whether it leads to the attacker running their own code depends on conditions lining up: the advisory names certain themes, including the older Twenty Twelve and Twenty Fourteen themes and popular third-party themes such as Neve, Hestia and Sydney, and certain server settings and leftover files. The advisory says the official Docker PHP image and cPanel's default configuration on PHP versions below 8.5 are affected.
The advisory lists every WordPress release from 4.7.0 to 7.1.1 as affected. The WordPress team released fixes for every one of those branches.
It isn't an isolated case. In January 2026, CISA added CVE-2025-68645, a PHP remote file inclusion flaw in Synacor's Zimbra Collaboration Suite, to the same catalogue.
What could go wrong for your business
According to OWASP, the widely used web-security reference, file-inclusion flaws can lead to sensitive files being read, the site being knocked offline, and in some setups the attacker running code on the server. Patchstack observed attackers using this WordPress flaw to try to write their own files onto servers.
For a business, an attacker able to run code on your server could potentially mean:
- Customer and business data being read or copied.
- Your website being defaced, taken offline or used to host malicious content.
- Costs for investigation, clean-up and rebuilding, plus time your team spends on recovery instead of the business.
- Reporting duties if personal data is involved, and the damage to customer trust that follows a public incident.
These are potential outcomes, not certainties. Whether a particular site is exploitable depends on its version, theme and server setup. That uncertainty is exactly why it is worth finding out.
Could your website be next?
Patchstack's timeline shows how quickly this moved. It recorded the first exploitation attempt on 22 September, the day of the fix. By the next day, public scanning tools were in circulation, with traffic more than ten times the first evening's volume, from what Patchstack describes as "a few hundred" source addresses.
That is how most attacks on known flaws work. Attackers rarely choose a business by name. Automated tools test large numbers of websites for a known weakness and report back the ones that respond. Your site can be tested simply because it is online and runs WordPress or PHP.
Being small or low-profile is no protection against that kind of scanning. Neither is a clean history. A site that has never had an incident may simply not have been tested against this particular flaw yet, or may have been compromised quietly without anyone noticing.
None of this means every WordPress or PHP site is vulnerable, or that an attack is inevitable. Exploitation depends on the right conditions lining up, so not every site is affected. But the gap between a fix being published and attackers using it can now be measured in hours.
Why legacy PHP applications deserve attention
File inclusion is not unique to PHP, and current, well-maintained PHP applications handle page routing in ways that avoid the classic pattern. The exposure is greatest in ageing systems, for several reasons.
Older PHP applications often map web addresses directly to files, and hand-written page systems from years ago commonly let the visitor's request decide which file to load. Servers configured by hand long ago can still carry risky settings and leftover tools that nobody remembers installing, and any of those can become a stepping stone for an attacker. Old themes, including retired default themes, are often left installed long after anyone uses them.
WordPress deserves credit for fixing this flaw all the way back to version 4.7. But a fix only helps a site that applies it, and the sites stuck on old versions are often the ones that stopped being updated years ago. A business that reviews its servers once a quarter, or relies on a freelancer who checks in occasionally, will always be behind attackers who move within hours.
Over time, these small gaps add up to technical debt: an application that is harder to understand, harder to update and harder to defend. At some point, modernising the application becomes a more sensible investment than patching around it.
What this means for your organisation
The first question is simple: do you know exactly what your websites run? Which WordPress version, which themes, which PHP version, and who set up the server? That includes staging copies and the forgotten microsite from years ago.
If nobody can answer with confidence, that is the finding. It suggests your organisation is relying on luck rather than knowledge, and it is far better to discover that through a planned review than through an incident. A clear picture of your application's condition is also the foundation for any sensible decision about whether to maintain it, upgrade it or move on from it.
Recommended next step
Don't wait for an attacker's scan to tell you whether your site is exposed to flaws like this one. Our free Legacy PHP assessment looks at your PHP and WordPress versions, themes, server setup and code, and highlights where risky patterns such as file inclusion may be present, along with the wider maintenance challenges behind them.
Then talk to our team about your findings and the options that fit. For some businesses, the right path is keeping a well-maintained PHP application up to date. For others, it is a planned migration to a modern stack such as Node.js, where routing is defined in code and the runtime follows a published long-term-support schedule. Node.js applications still need good security practice, so it is not a guarantee, but it can give you a platform that is easier to keep current. Whichever direction suits your application and business goals, it should be a decision you plan, not one forced on you by the next advisory.
Free Legacy PHP Risk Assessment
We'll review your PHP and WordPress versions, server configuration and code for risky patterns like dynamic file inclusion, and tell you plainly where you're exposed and what your options are, from configuration changes to an upgrade or a migration.




